072e519171
- removed all submodules I will create an openstack repo to hold all modules (including nova) as submodules - moved nova module to top dir
23 lines
457 B
Ruby
23 lines
457 B
Ruby
Puppet::Type.type(:nova_network).provide(:nova_manage) do
|
|
|
|
desc "Manage nova network"
|
|
|
|
defaultfor :kernel => 'Linux'
|
|
|
|
commands :nova_manage => 'nova-manage'
|
|
|
|
def exists?
|
|
nova_manage("network", "list").match(/^#{resource[:network]}\/[0-9]{1,2} /)
|
|
end
|
|
|
|
def create
|
|
nova_manage("network", "create", resource[:network], "1", resource[:available_ips])
|
|
end
|
|
|
|
def destroy
|
|
nova_manage("network", "delete", resource[:network])
|
|
end
|
|
|
|
end
|
|
|