Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add net attribute, deprecate networking #152

Merged
merged 2 commits into from
Jun 24, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ link | Add link to another container | String, Array | nil
label | Options to pass to underlying labeling system | String | nil
lxc_conf | Custom LXC options | String, Array | nil
memory | Set memory limit for container | Fixnum | nil
networking | Configure networking for container | TrueClass, FalseClass | true
net | [Configure networking](http://docs.docker.io/reference/run/#network-settings) for container | String | nil
networking (*DEPRECATED*) | Configure networking for container | TrueClass, FalseClass | true
opt | Custom driver options | String, Array | nil
port | Map network port(s) to the container | Fixnum (*DEPRECATED*), String, Array | nil
privileged | Give extended privileges | TrueClass, FalseClass | nil
Expand Down
1 change: 1 addition & 0 deletions providers/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ def run
'link' => Array(new_resource.link),
'lxc-conf' => Array(new_resource.lxc_conf),
'memory' => new_resource.memory,
'net' => new_resource.net,
'networking' => new_resource.networking,
'name' => container_name,
'opt' => Array(new_resource.opt),
Expand Down
4 changes: 4 additions & 0 deletions resources/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
attribute :lxc_conf, :kind_of => [String, Array]
attribute :memory, :kind_of => [Fixnum]
attribute :message, :kind_of => [String]
attribute :net, :kind_of => [String], :regex => [
/(host|bridge|none)/, /container:.*/
]
# networking attribute is DEPRECATED
attribute :networking, :kind_of => [TrueClass, FalseClass]
attribute :opt, :kind_of => [String, Array]
# Fixnum kind_of port attribute is DEPRECATED
Expand Down