diff --git a/nautobot_ssot_aristacv/tests/test_utils_cloudvision.py b/nautobot_ssot_aristacv/tests/test_utils_cloudvision.py index 20714a2..492c0c6 100644 --- a/nautobot_ssot_aristacv/tests/test_utils_cloudvision.py +++ b/nautobot_ssot_aristacv/tests/test_utils_cloudvision.py @@ -123,7 +123,7 @@ def test_get_device_tags(self): mock_tag.value.device_id.value = "JPE12345678" tag_stub = MagicMock() - tag_stub.TagAssignmentConfigServiceStub.return_value.GetAll.return_value = [mock_tag] + tag_stub.TagAssignmentServiceStub.return_value.GetAll.return_value = [mock_tag] with patch("nautobot_ssot_aristacv.utils.cloudvision.tag_services", tag_stub): results = cloudvision.get_device_tags(client=self.client, device_id="JPE12345678") diff --git a/nautobot_ssot_aristacv/utils/cloudvision.py b/nautobot_ssot_aristacv/utils/cloudvision.py index 90d2ea5..6ee43f6 100644 --- a/nautobot_ssot_aristacv/utils/cloudvision.py +++ b/nautobot_ssot_aristacv/utils/cloudvision.py @@ -308,12 +308,14 @@ def get_tags_by_type(client, creator_type: int = tag_models.CREATOR_TYPE_USER): def get_device_tags(client, device_id: str): """Get tags for specific device.""" - tag_stub = tag_services.TagAssignmentConfigServiceStub(client) + tag_stub = tag_services.TagAssignmentServiceStub(client) req = tag_services.TagAssignmentConfigStreamRequest( partial_eq_filter=[ tag_models.TagAssignmentConfig( key=tag_models.TagAssignmentKey( device_id=StringValue(value=device_id), + element_type=tag_models.ELEMENT_TYPE_DEVICE, + workspace_id=StringValue(value=""), ) ) ]