mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
0c34ca84f5
Added support for OpenStack Network Connectivity (Quantum).
30 lines
No EOL
1.1 KiB
Ruby
30 lines
No EOL
1.1 KiB
Ruby
Shindo.tests("Fog::Network[:openstack] | subnet", ['openstack']) do
|
|
|
|
tests('success') do
|
|
|
|
tests('#create').succeeds do
|
|
@instance = Fog::Network[:openstack].subnets.create(:name => 'subnet_name',
|
|
:network_id => 'net_id',
|
|
:cidr => '10.2.2.0/24',
|
|
:ip_version => 4,
|
|
:gateway_ip => '10.2.2.1',
|
|
:allocation_pools => [],
|
|
:dns_nameservers => [],
|
|
:host_routes => [],
|
|
:enable_dhcp => true,
|
|
:tenant_id => 'tenant_id')
|
|
!@instance.id.nil?
|
|
end
|
|
|
|
tests('#update').succeeds do
|
|
@instance.name = 'new_subnet_name'
|
|
@instance.update
|
|
end
|
|
|
|
tests('#destroy').succeeds do
|
|
@instance.destroy == true
|
|
end
|
|
|
|
end
|
|
|
|
end |