@@ -62,6 +62,7 @@ def setUp(self):
6262 self .app , self .namespace )
6363
6464 self .columns = (
65+ 'description' ,
6566 'external_port' ,
6667 'floatingip_id' ,
6768 'id' ,
@@ -73,6 +74,7 @@ def setUp(self):
7374 )
7475
7576 self .data = (
77+ self .new_port_forwarding .description ,
7678 self .new_port_forwarding .external_port ,
7779 self .new_port_forwarding .floatingip_id ,
7880 self .new_port_forwarding .id ,
@@ -102,6 +104,8 @@ def test_create_all_options(self):
102104 self .new_port_forwarding .floatingip_id ,
103105 '--internal-ip-address' ,
104106 self .new_port_forwarding .internal_ip_address ,
107+ '--description' ,
108+ self .new_port_forwarding .description ,
105109 ]
106110 verifylist = [
107111 ('port' , self .new_port_forwarding .internal_port_id ),
@@ -111,6 +115,7 @@ def test_create_all_options(self):
111115 ('floating_ip' , self .new_port_forwarding .floatingip_id ),
112116 ('internal_ip_address' , self .new_port_forwarding .
113117 internal_ip_address ),
118+ ('description' , self .new_port_forwarding .description ),
114119 ]
115120 parsed_args = self .check_parser (self .cmd , arglist , verifylist )
116121 columns , data = self .cmd .take_action (parsed_args )
@@ -126,6 +131,7 @@ def test_create_all_options(self):
126131 'internal_port_id' : self .new_port_forwarding .
127132 internal_port_id ,
128133 'protocol' : self .new_port_forwarding .protocol ,
134+ 'description' : self .new_port_forwarding .description ,
129135 })
130136 self .assertEqual (self .columns , columns )
131137 self .assertEqual (self .data , data )
@@ -251,7 +257,8 @@ class TestListFloatingIPPortForwarding(TestFloatingIPPortForwarding):
251257 'Internal IP Address' ,
252258 'Internal Port' ,
253259 'External Port' ,
254- 'Protocol'
260+ 'Protocol' ,
261+ 'Description' ,
255262 )
256263
257264 def setUp (self ):
@@ -273,6 +280,7 @@ def setUp(self):
273280 port_forwarding .internal_port ,
274281 port_forwarding .external_port ,
275282 port_forwarding .protocol ,
283+ port_forwarding .description ,
276284 ))
277285 self .network .floating_ip_port_forwardings = mock .Mock (
278286 return_value = self .port_forwardings
@@ -393,6 +401,7 @@ def test_set_all_thing(self):
393401 '--internal-protocol-port' , '100' ,
394402 '--external-protocol-port' , '200' ,
395403 '--protocol' , 'tcp' ,
404+ '--description' , 'some description' ,
396405 self ._port_forwarding .floatingip_id ,
397406 self ._port_forwarding .id ,
398407 ]
@@ -402,6 +411,7 @@ def test_set_all_thing(self):
402411 ('internal_protocol_port' , 100 ),
403412 ('external_protocol_port' , 200 ),
404413 ('protocol' , 'tcp' ),
414+ ('description' , 'some description' ),
405415 ('floating_ip' , self ._port_forwarding .floatingip_id ),
406416 ('port_forwarding_id' , self ._port_forwarding .id ),
407417 ]
@@ -415,6 +425,7 @@ def test_set_all_thing(self):
415425 'internal_port' : 100 ,
416426 'external_port' : 200 ,
417427 'protocol' : 'tcp' ,
428+ 'description' : 'some description' ,
418429 }
419430 self .network .update_floating_ip_port_forwarding .assert_called_with (
420431 self ._port_forwarding .floatingip_id ,
@@ -428,6 +439,7 @@ class TestShowFloatingIPPortForwarding(TestFloatingIPPortForwarding):
428439
429440 # The port forwarding to show.
430441 columns = (
442+ 'description' ,
431443 'external_port' ,
432444 'floatingip_id' ,
433445 'id' ,
@@ -450,6 +462,7 @@ def setUp(self):
450462 )
451463 )
452464 self .data = (
465+ self ._port_forwarding .description ,
453466 self ._port_forwarding .external_port ,
454467 self ._port_forwarding .floatingip_id ,
455468 self ._port_forwarding .id ,
0 commit comments