def test_nics_string_net_name(self):
     '''
     - os_server:
         nics: net-name=network1
     '''
     args = os_server._network_args(self.module, self.cloud)
     assert (args[0]['net-id'] == '5678')
 def test_nics_string_port_name(self):
     '''
     - os_server:
         nics: port-name=port1
     '''
     args = os_server._network_args(self.module, self.cloud)
     assert (args[0]['port-id'] == '1234')
 def test_nics_string_net_id(self):
     '''
     - os_server:
         nics: net-id=1234
     '''
     args = os_server._network_args(self.module, self.cloud)
     assert (args[0]['net-id'] == '1234')
 def test_nics_structured_mixed(self):
     '''
     - os_server:
         nics:
             - net-id: '1234'
             - port-name: port1
             - 'net-name=network1,port-id=4321'
     '''
     args = os_server._network_args(self.module, self.cloud)
     assert (args[0]['net-id'] == '1234')
     assert (args[1]['port-id'] == '1234')
     assert (args[2]['net-id'] == '5678')
     assert (args[3]['port-id'] == '4321')