Skip to content

Commit

Permalink
Merge pull request #152 from philk/add_net_flag
Browse files Browse the repository at this point in the history
Add net attribute, deprecate networking
  • Loading branch information
bflad committed Jun 24, 2014
2 parents 6dbf758 + ce426ae commit 8a03d40
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
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 @@ -319,6 +319,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

0 comments on commit 8a03d40

Please sign in to comment.