Search in sources :

Example 11 with ResourceTagResponse

use of com.cloud.api.response.ResourceTagResponse in project cosmic by MissionCriticalCloud.

the class ResourceTagJoinDaoImpl method newResourceTagResponse.

@Override
public ResourceTagResponse newResourceTagResponse(final ResourceTagJoinVO resourceTag, final boolean keyValueOnly) {
    final ResourceTagResponse response = new ResourceTagResponse();
    response.setKey(resourceTag.getKey());
    response.setValue(resourceTag.getValue());
    if (!keyValueOnly) {
        response.setResourceType(resourceTag.getResourceType().toString());
        response.setResourceId(resourceTag.getResourceUuid());
        ApiResponseHelper.populateOwner(response, resourceTag);
        response.setDomainId(resourceTag.getDomainUuid());
        response.setDomainName(resourceTag.getDomainName());
        response.setCustomer(resourceTag.getCustomer());
    }
    response.setObjectName("tag");
    return response;
}
Also used : ResourceTagResponse(com.cloud.api.response.ResourceTagResponse)

Aggregations

ResourceTagResponse (com.cloud.api.response.ResourceTagResponse)11 ResourceTag (com.cloud.server.ResourceTag)9 ArrayList (java.util.ArrayList)9 DataCenter (com.cloud.dc.DataCenter)5 Network (com.cloud.network.Network)5 PhysicalNetwork (com.cloud.network.PhysicalNetwork)5 FirewallRule (com.cloud.network.rules.FirewallRule)3 NetworkACL (com.cloud.network.vpc.NetworkACL)3 Vpc (com.cloud.network.vpc.Vpc)3 NetworkResponse (com.cloud.api.response.NetworkResponse)2 PhysicalNetworkResponse (com.cloud.api.response.PhysicalNetworkResponse)2 ServiceResponse (com.cloud.api.response.ServiceResponse)2 IpAddress (com.cloud.network.IpAddress)2 Service (com.cloud.network.Network.Service)2 NetworkVO (com.cloud.network.dao.NetworkVO)2 PhysicalNetworkVO (com.cloud.network.dao.PhysicalNetworkVO)2 UserVm (com.cloud.uservm.UserVm)2 HashSet (java.util.HashSet)2 ResourceTagJoinVO (com.cloud.api.query.vo.ResourceTagJoinVO)1 CapabilityResponse (com.cloud.api.response.CapabilityResponse)1