def test_port_configurable_fail_no_config(self):
     ''' Test port_configurable configlet empty.
     '''
     module = Mock()
     module.params = dict(switch_name='eos', switch_port='2')
     config = ''
     configlet = dict(name='eos-server', config=config)
     result = cv_server_provision.port_configurable(module, configlet)
     self.assertFalse(result)
 def test_port_configurable_fail_no_config(self):
     ''' Test port_configurable configlet empty.
     '''
     module = Mock()
     module.params = dict(switch_name='eos', switch_port='2')
     config = ''
     configlet = dict(name='eos-server', config=config)
     result = cv_server_provision.port_configurable(module, configlet)
     self.assertFalse(result)
 def test_port_configurable_fail(self):
     ''' Test port_configurable user provided switch port not in configlet.
     '''
     module = Mock()
     module.params = dict(switch_name='eos', switch_port='2')
     config = '!\ninterface Ethernet3\n!\ninterface Ethernet4\n!'
     configlet = dict(name='eos-server', config=config)
     result = cv_server_provision.port_configurable(module, configlet)
     self.assertFalse(result)
 def test_port_configurable_fail(self):
     ''' Test port_configurable user provided switch port not in configlet.
     '''
     module = Mock()
     module.params = dict(switch_name='eos', switch_port='2')
     config = '!\ninterface Ethernet3\n!\ninterface Ethernet4\n!'
     configlet = dict(name='eos-server', config=config)
     result = cv_server_provision.port_configurable(module, configlet)
     self.assertFalse(result)