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 ether protocol to onevnet addressrange type #153

Merged
merged 6 commits into from
May 13, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ Create onevnet addressrange
```
onevnet_addressrange { '<name>':
ensure => present | absent,
onevnet_name => '<name>',
onevnet_name => '<name>', # this has to be an existing onevnet - will be autorequired if declared
ar_id => '<INT>', # read only value
protocol => ip4 | ip6 | ip4_6 | ether,
size => '10',
mac => '02:00:0a:00:00:96', # optional
# attributes for ip4 and ip4_6:
ip => '10.0.2.20'
# attributes for ip6:
global_prefix => '2001:a::', # optional
ula_prefix => 'fd01:a:b::', # optional
globalprefix => '2001:a::', # optional
ulaprefix => 'fd01:a:b::', # optional
}
```

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/onevnet_addressrange/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def flush
file.close
self.debug(IO.read file.path)
self.debug(@property_hash)
onevnet('updatear', resource[:onevnet_name], ar_id, file.path ) unless @property_hash.empty? or ar_id.nil?
onevnet('updatear', resource[:onevnet_name], ar_id, file.path ) unless ( @property_hash.empty? or ar_id.nil? or defined? ar_id )
file.delete
end

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/onevnet_addressrange.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

newproperty(:protocol) do
desc "Type of the addressrange. Valid values: IP4, IP6, IP4_6"
newvalues(:ip4, :ip6, :ip4_6)
newvalues(:ip4, :ip6, :ip4_6, :ether)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add ehter also to description?

end

newproperty(:ip_start) do
Expand Down