def test_network_v6_comp_unit_update(self):
        kind = Kind()
        res = kind.network_v6_comp_unit({
            'action': 'Alterar',
            'data': {'id_object': 1}
        })

        self.assertEqual(res, False)
    def test_networkv6_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_network_ipv6_id').start()
        napi_mock.return_value = []
        data = self._queue_message('tests/json/messages/queue/networkv6.json')

        kind = Kind()
        res = kind.network_v6(data[1])

        self.assertEqual(res, False)
    def test_environment_vlan_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_vlan').start()
        napi_mock.return_value = []
        data = self._queue_message('tests/json/messages/queue/vlan.json')

        kind = Kind()
        res = kind.environment_vlan(data[1])

        self.assertEqual(res, False)
Example #4
0
    def test_vlan_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_vlan').start()
        napi_mock.return_value = []
        data = self._queue_message('tests/json/messages/queue/vlan.json')

        kind = Kind()
        res = kind.vlan(data[1])

        self.assertEqual(res, False)
Example #5
0
    def test_comp_unit_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_equipment').start()
        napi_mock.return_value = []
        data = self._queue_message('tests/json/messages/queue/equipment.json')

        kind = Kind()
        res = kind.comp_unit(data[0])

        self.assertEqual(res, False)
    def test_comp_unit_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_equipment').start()
        napi_mock.return_value = []
        data = self._queue_message('tests/json/messages/queue/equipment.json')

        kind = Kind()
        res = kind.comp_unit(data[0])

        self.assertEqual(res, False)
Example #7
0
    def test_network_v6_comp_unit_update(self):
        kind = Kind()
        res = kind.network_v6_comp_unit({
            'action': 'Alterar',
            'data': {
                'id_object': 1
            }
        })

        self.assertEqual(res, False)
    def test_port_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_vip_by_portpool_id').start()
        napi_mock.return_value = []
        data = self._queue_message(
            'tests/json/messages/queue/vip_request_port_pool.json')

        kind = Kind()
        res = kind.port(data[1])

        self.assertEqual(res, False)
    def test_vip(self):
        self._mock_vip()

        data = self._queue_message(
            'tests/json/messages/queue/vip_request.json')
        data_ret = self._update_message('tests/json/messages/updates/vip.json')

        for i in range(3):
            kind = Kind()

            res = kind.vip(data[i])
            self.assertDictEqual(res, data_ret[i])
Example #10
0
    def test_vlan_networkv6(self):
        self._mock_networkv6()

        data = self._queue_message('tests/json/messages/queue/networkv6.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/vlan_networkv6.json')

        for i in range(3):
            kind = Kind()

            res = kind.vlan_network_v6(data[i])
            self.assertDictEqual(res, data_ret[i])
Example #11
0
    def test_vip(self):
        self._mock_vip()

        data = self._queue_message(
            'tests/json/messages/queue/vip_request.json')
        data_ret = self._update_message('tests/json/messages/updates/vip.json')

        for i in range(3):
            kind = Kind()

            res = kind.vip(data[i])
            self.assertDictEqual(res, data_ret[i])
Example #12
0
    def test_comp_unit(self):
        self._mock_equipment()

        data = self._queue_message('tests/json/messages/queue/equipment.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/comp_unit.json')

        for i in range(3):
            kind = Kind()

            res = kind.comp_unit(data[i])
            self.assertDictEqual(res, data_ret[i])
Example #13
0
    def test_ipv6_eqpt(self):
        self._mock_ipv6()

        data = self._queue_message('tests/json/messages/queue/ipv6_eqpt.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/networkv6_comp_unit.json')

        for i in range(2):
            kind = Kind()

            res = kind.network_v6_comp_unit(data[i])
            self.assertDictEqual(res, data_ret[i])
Example #14
0
    def test_environment_vlan(self):
        self._mock_vlan()

        data = self._queue_message('tests/json/messages/queue/vlan.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/environment_vlan.json')

        for i in range(3):
            kind = Kind()

            res = kind.environment_vlan(data[i])
            self.assertDictEqual(res, data_ret[i])
    def test_environment_vlan(self):
        self._mock_vlan()

        data = self._queue_message(
            'tests/json/messages/queue/vlan.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/environment_vlan.json')

        for i in range(3):
            kind = Kind()

            res = kind.environment_vlan(data[i])
            self.assertDictEqual(res, data_ret[i])
    def test_port(self):
        self._mock_vip_by_portpool_id()

        data = self._queue_message(
            'tests/json/messages/queue/vip_request_port_pool.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/port.json')

        for i in range(3):
            kind = Kind()

            res = kind.port(data[i])
            self.assertDictEqual(res, data_ret[i])
    def test_pool_comp_unit(self):
        self._mock_pool_member_id()

        data = self._queue_message(
            'tests/json/messages/queue/server_pool_member.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/pool_comp_unit.json')

        for i in range(3):
            kind = Kind()

            res = kind.pool_comp_unit(data[i])
            self.assertDictEqual(res, data_ret[i])
Example #18
0
    def test_father_environment(self):
        self._mock_environment()

        data = self._queue_message(
            'tests/json/messages/queue/environment.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/father_environment.json')

        for i in range(3):
            kind = Kind()

            res = kind.father_environment(data[i])
            self.assertDictEqual(res, data_ret[i])
Example #19
0
    def test_pool_comp_unit(self):
        self._mock_pool_member_id()

        data = self._queue_message(
            'tests/json/messages/queue/server_pool_member.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/pool_comp_unit.json')

        for i in range(3):
            kind = Kind()

            res = kind.pool_comp_unit(data[i])
            self.assertDictEqual(res, data_ret[i])
Example #20
0
    def test_port(self):
        self._mock_vip_by_portpool_id()

        data = self._queue_message(
            'tests/json/messages/queue/vip_request_port_pool.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/port.json')

        for i in range(3):
            kind = Kind()

            res = kind.port(data[i])
            self.assertDictEqual(res, data_ret[i])
    def test_comp_unit(self):
        self._mock_equipment()

        data = self._queue_message(
            'tests/json/messages/queue/equipment.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/comp_unit.json')

        for i in range(3):
            kind = Kind()

            res = kind.comp_unit(data[i])
            self.assertDictEqual(res, data_ret[i])
    def test_father_environment(self):
        self._mock_environment()

        data = self._queue_message(
            'tests/json/messages/queue/environment.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/father_environment.json')

        for i in range(3):
            kind = Kind()

            res = kind.father_environment(data[i])
            self.assertDictEqual(res, data_ret[i])
    def test_vlan_networkv6(self):
        self._mock_networkv6()

        data = self._queue_message(
            'tests/json/messages/queue/networkv6.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/vlan_networkv6.json')

        for i in range(3):
            kind = Kind()

            res = kind.vlan_network_v6(data[i])
            self.assertDictEqual(res, data_ret[i])
    def test_ipv6_eqpt(self):
        self._mock_ipv6()

        data = self._queue_message(
            'tests/json/messages/queue/ipv6_eqpt.json')
        data_ret = self._update_message(
            'tests/json/messages/updates/networkv6_comp_unit.json')

        for i in range(2):
            kind = Kind()

            res = kind.network_v6_comp_unit(data[i])
            self.assertDictEqual(res, data_ret[i])