2013-03-28 18:13:49 -04:00
|
|
|
Shindo.tests('HP::Network | networking network model', ['hp', 'networking', 'network']) do
|
|
|
|
|
|
|
|
model_tests(HP[:network].networks, {:name => 'fognetwork'}, true)
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
tests('#create').succeeds do
|
|
|
|
attributes = {:name => 'my_network', :admin_state_up => true, :shared => false}
|
|
|
|
@network = HP[:network].networks.create(attributes)
|
|
|
|
@network.wait_for { ready? } unless Fog.mocking?
|
|
|
|
!@network.id.nil?
|
|
|
|
end
|
|
|
|
|
2013-03-29 14:36:12 -04:00
|
|
|
tests('#save').succeeds do
|
2013-03-28 18:13:49 -04:00
|
|
|
@network.name = 'my_network_upd'
|
2013-03-29 14:36:12 -04:00
|
|
|
@network.save
|
2013-03-28 18:13:49 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
tests('#destroy').succeeds do
|
|
|
|
@network.destroy
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|