2013-04-08 16:45:54 -04:00
|
|
|
Shindo.tests('HP::Network | networking ports collection', ['hp', 'networking', 'port']) do
|
2013-04-01 15:27:48 -04:00
|
|
|
|
|
|
|
@network = HP[:network].networks.create(:name => 'my_network')
|
|
|
|
|
|
|
|
attributes = {:name => 'my_port', :network_id => @network.id}
|
|
|
|
collection_tests(HP[:network].ports, attributes, true)
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
attributes = {:name => 'fogport', :network_id => @network.id}
|
|
|
|
@port = HP[:network].ports.create(attributes)
|
|
|
|
|
|
|
|
tests('#all(filter)').succeeds do
|
2013-04-04 15:34:17 -04:00
|
|
|
HP[:network].ports.all({:name => 'fogport'})
|
2013-04-01 15:27:48 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
@port.destroy
|
|
|
|
end
|
|
|
|
|
|
|
|
@network.destroy
|
|
|
|
end
|