@@ -61,6 +61,25 @@ def test_create_floatingip_and_port(self):
6161 _str = self ._test_create_resource (resource , cmd , name , myid , args ,
6262 position_names , position_values )
6363
64+ def test_create_floatingip_and_port_and_address (self ):
65+ """Create floatingip: fip1 with a given port and address"""
66+ resource = 'floatingip'
67+ cmd = CreateFloatingIP (MyApp (sys .stdout ), None )
68+ name = 'fip1'
69+ myid = 'myid'
70+ pid = 'mypid'
71+ addr = '10.0.0.99'
72+ args = [name , '--port_id' , pid , '--fixed_ip_address' , addr ]
73+ position_names = ['floating_network_id' , 'port_id' , 'fixed_ip_address' ]
74+ position_values = [name , pid , addr ]
75+ _str = self ._test_create_resource (resource , cmd , name , myid , args ,
76+ position_names , position_values )
77+ # Test dashed options
78+ args = [name , '--port-id' , pid , '--fixed-ip-address' , addr ]
79+ position_names = ['floating_network_id' , 'port-id' , 'fixed-ip-address' ]
80+ _str = self ._test_create_resource (resource , cmd , name , myid , args ,
81+ position_names , position_values )
82+
6483 def test_list_floatingips (self ):
6584 """list floatingips: -D."""
6685 resources = 'floatingips'
0 commit comments