Exemplo n.º 1
0
 def test_get_device_info(self):
     bigip = mock.MagicMock()
     device = mock.MagicMock()
     device.selfDevice = 'true'
     bigip.tm.cm.devices.get_collection.return_value = [device]
     ret = utils.get_device_info(bigip)
     assert ret is device
Exemplo n.º 2
0
 def test_get_device_info(self):
     bigip = mock.MagicMock()
     device = mock.MagicMock()
     device.selfDevice = 'true'
     bigip.tm.cm.devices.get_collection.return_value = [device]
     ret = utils.get_device_info(bigip)
     assert ret is device
Exemplo n.º 3
0
    def _check_vcmp_host_assignments(self):
        '''Check that all vCMP Guest bigips have a host assignment.'''

        log_prefix = 'VcmpManager::_check_vcmp_host_assignments'
        LOG.debug(('{} Check registered bigips to ensure vCMP Guests '
                   'have a vCMP host assignment'.format(log_prefix)))

        for bigip in self.driver.get_all_bigips():
            system_info = utils.get_device_info(bigip)
            if system_info.platformId == 'Z101':
                if self.get_vcmp_host(bigip):
                    LOG.debug(('{0} vCMP host found for Guest {1}'.format(
                        log_prefix, bigip.hostname)))
                else:
                    LOG.error(('{0} vCMP host not found for Guest {1}'.format(
                        log_prefix, bigip.hostname)))
            else:
                LOG.debug(('{0} BIG-IP {1} is not a vCMP Guest'.format(
                    log_prefix, bigip.hostname)))
Exemplo n.º 4
0
    def _check_vcmp_host_assignments(self):
        '''Check that all vCMP Guest bigips have a host assignment.'''

        log_prefix = 'VcmpManager::_check_vcmp_host_assignments'
        LOG.debug(('{} Check registered bigips to ensure vCMP Guests '
                   'have a vCMP host assignment'.format(log_prefix)))

        for bigip in self.driver.get_all_bigips():
            system_info = utils.get_device_info(bigip)
            if system_info.platformId == 'Z101':
                if self.get_vcmp_host(bigip):
                    LOG.debug(('{0} vCMP host found for Guest {1}'.format(
                        log_prefix, bigip.hostname)))
                else:
                    LOG.error(('{0} vCMP host not found for Guest {1}'.format(
                        log_prefix, bigip.hostname)))
            else:
                LOG.debug(('{0} BIG-IP {1} is not a vCMP Guest'.format(
                    log_prefix, bigip.hostname)))