Search in sources :

Example 21 with NetworkInterfaceState

use of com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState in project photon-model by vmware.

the class BaseVSphereAdapterTest method createNic.

protected String createNic(String name, String networkLink) throws Throwable {
    // Create Subnet
    this.subnet = new SubnetState();
    this.subnet.networkLink = networkLink;
    this.subnet.endpointLink = "/some/endpoint/link";
    this.subnet.lifecycleState = LifecycleState.READY;
    this.subnet.id = this.subnet.name = this.networkId;
    ManagedObjectReference ref = new ManagedObjectReference();
    ref.setValue("network-4127");
    ref.setType(VimNames.TYPE_NETWORK);
    CustomProperties.of(this.subnet).put(CustomProperties.TYPE, VimNames.TYPE_NETWORK).put(CustomProperties.MOREF, ref);
    this.subnet = TestUtils.doPost(this.host, this.subnet, SubnetState.class, UriUtils.buildUri(this.host, SubnetService.FACTORY_LINK));
    this.nicDescription = new NetworkInterfaceDescription();
    this.nicDescription.assignment = NetworkInterfaceDescriptionService.IpAssignment.DYNAMIC;
    this.nicDescription = TestUtils.doPost(this.host, this.nicDescription, NetworkInterfaceDescription.class, UriUtils.buildUri(this.host, NetworkInterfaceDescriptionService.FACTORY_LINK));
    this.nicDescription.subnetLink = this.subnet.documentSelfLink;
    NetworkInterfaceState nic = new NetworkInterfaceState();
    nic.name = name;
    nic.subnetLink = this.subnet.documentSelfLink;
    nic.networkInterfaceDescriptionLink = this.nicDescription.documentSelfLink;
    nic = TestUtils.doPost(this.host, nic, NetworkInterfaceState.class, UriUtils.buildUri(this.host, NetworkInterfaceService.FACTORY_LINK));
    return nic.documentSelfLink;
}
Also used : NetworkInterfaceDescription(com.vmware.photon.controller.model.resources.NetworkInterfaceDescriptionService.NetworkInterfaceDescription) NetworkInterfaceState(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState) SubnetState(com.vmware.photon.controller.model.resources.SubnetService.SubnetState) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference)

Example 22 with NetworkInterfaceState

use of com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState in project photon-model by vmware.

the class AzureTestUtil method createDefaultNicStates.

/*
     * NOTE: It is highly recommended to keep this method in sync with its AWS counterpart:
     * TestAWSSetupUtils.createAWSNicStates
     */
public static List<NetworkInterfaceState> createDefaultNicStates(VerificationHost host, ComputeState computeHost, EndpointState endpointState, Set<String> networkRGLinks, Set<String> sgRGLinks, AzureNicSpecs azureNicSpecs, String azureVMName) throws Throwable {
    // Create network state.
    NetworkState networkState;
    {
        networkState = new NetworkState();
        networkState.id = azureNicSpecs.network.name;
        networkState.name = azureNicSpecs.network.name;
        networkState.subnetCIDR = azureNicSpecs.network.cidr;
        networkState.authCredentialsLink = endpointState.authCredentialsLink;
        networkState.endpointLink = endpointState.documentSelfLink;
        networkState.endpointLinks = new HashSet<>();
        networkState.endpointLinks.add(endpointState.documentSelfLink);
        networkState.tenantLinks = endpointState.tenantLinks;
        networkState.resourcePoolLink = computeHost.resourcePoolLink;
        networkState.groupLinks = networkRGLinks;
        networkState.regionId = azureNicSpecs.network.zoneId;
        networkState.instanceAdapterReference = UriUtils.buildUri(host, DEFAULT_INSTANCE_ADAPTER_REFERENCE);
        networkState.tagLinks = createTagStateSet(host, endpointState.tenantLinks, TAG_KEY_TYPE, azure_vnet.name());
        networkState.computeHostLink = endpointState.computeHostLink;
        networkState = TestUtils.doPost(host, networkState, NetworkState.class, UriUtils.buildUri(host, NetworkService.FACTORY_LINK));
    }
    // Create NIC states.
    List<NetworkInterfaceState> nics = new ArrayList<>();
    for (int i = 0; i < azureNicSpecs.nicSpecs.size(); i++) {
        NicSpec nicSpec = azureNicSpecs.nicSpecs.get(i);
        // Create subnet state per NIC.
        SubnetState subnetState;
        {
            subnetState = new SubnetState();
            subnetState.id = azureNicSpecs.nicSpecs.get(i).subnetSpec.name;
            subnetState.name = azureNicSpecs.nicSpecs.get(i).subnetSpec.name;
            subnetState.subnetCIDR = azureNicSpecs.nicSpecs.get(i).subnetSpec.cidr;
            subnetState.zoneId = azureNicSpecs.nicSpecs.get(i).subnetSpec.zoneId;
            subnetState.networkLink = networkState.documentSelfLink;
            subnetState.endpointLink = endpointState.documentSelfLink;
            subnetState.endpointLinks = new HashSet<>();
            subnetState.endpointLinks.add(endpointState.documentSelfLink);
            subnetState.computeHostLink = endpointState.computeHostLink;
            subnetState.tenantLinks = endpointState.tenantLinks;
            subnetState.tagLinks = createTagStateSet(host, endpointState.tenantLinks, TAG_KEY_TYPE, azure_subnet.name());
            subnetState = TestUtils.doPost(host, subnetState, SubnetState.class, UriUtils.buildUri(host, SubnetService.FACTORY_LINK));
        }
        // Create security group state
        SecurityGroupState securityGroupState;
        {
            securityGroupState = new SecurityGroupState();
            securityGroupState.name = AZURE_SECURITY_GROUP_NAME + "-" + azureVMName;
            securityGroupState.authCredentialsLink = endpointState.authCredentialsLink;
            securityGroupState.endpointLink = endpointState.documentSelfLink;
            securityGroupState.endpointLinks = new HashSet<>();
            securityGroupState.endpointLinks.add(endpointState.documentSelfLink);
            securityGroupState.computeHostLink = endpointState.computeHostLink;
            securityGroupState.tenantLinks = endpointState.tenantLinks;
            securityGroupState.groupLinks = sgRGLinks;
            securityGroupState.regionId = "regionId";
            securityGroupState.resourcePoolLink = "/link/to/rp";
            securityGroupState.instanceAdapterReference = new URI("http://instanceAdapterReference");
            {
                Rule ssh = new Rule();
                ssh.name = "ssh-in";
                ssh.protocol = "tcp";
                ssh.ipRangeCidr = "0.0.0.0/0";
                ssh.ports = "22";
                securityGroupState.ingress = Collections.singletonList(ssh);
            }
            {
                Rule out = new Rule();
                out.name = "out";
                out.protocol = "tcp";
                out.ipRangeCidr = "0.0.0.0/0";
                out.ports = SecurityGroupService.ALL_PORTS;
                securityGroupState.egress = Collections.singletonList(out);
            }
            securityGroupState = TestUtils.doPost(host, securityGroupState, SecurityGroupState.class, UriUtils.buildUri(host, SecurityGroupService.FACTORY_LINK));
        }
        // Create NIC description.
        NetworkInterfaceDescription nicDescription;
        {
            nicDescription = new NetworkInterfaceDescription();
            nicDescription.id = "nicDesc" + i;
            nicDescription.name = generateName("nicDesc" + i);
            nicDescription.deviceIndex = i;
            nicDescription.assignPublicIpAddress = azureNicSpecs.assignPublicIpAddress;
            nicDescription.tenantLinks = endpointState.tenantLinks;
            nicDescription.endpointLink = endpointState.documentSelfLink;
            nicDescription.endpointLinks = new HashSet<>();
            nicDescription.endpointLinks.add(endpointState.documentSelfLink);
            nicDescription.computeHostLink = endpointState.computeHostLink;
            nicDescription.assignment = nicSpec.getIpAssignment();
            // if staticIp is null, it will be assigned automatically by DHCP.
            nicDescription.address = nicSpec.ip();
            nicDescription = TestUtils.doPost(host, nicDescription, NetworkInterfaceDescription.class, UriUtils.buildUri(host, NetworkInterfaceDescriptionService.FACTORY_LINK));
        }
        NetworkInterfaceState nicState = new NetworkInterfaceState();
        nicState.id = "nic" + i;
        nicState.name = generateName("nic" + i);
        nicState.deviceIndex = nicDescription.deviceIndex;
        nicState.networkInterfaceDescriptionLink = nicDescription.documentSelfLink;
        nicState.subnetLink = subnetState.documentSelfLink;
        nicState.networkLink = subnetState.networkLink;
        nicState.tenantLinks = endpointState.tenantLinks;
        nicState.endpointLink = endpointState.documentSelfLink;
        nicState.endpointLinks = new HashSet<>();
        nicState.endpointLinks.add(endpointState.documentSelfLink);
        nicState.computeHostLink = endpointState.computeHostLink;
        if (nicSpec.getIpAssignment() == IpAssignment.STATIC) {
            // There is a rule in:
            // \photon-model\photon-model\src\main\java\com\vmware\photon\controller\model\resources\NetworkInterfaceService.java::validateState()
            // // which will throws java.lang.IllegalArgumentException: both networkLink and IP
            // cannot be set
            nicState.networkLink = null;
        }
        if (i == 0) {
            // Attach security group only on the primary nic.
            nicState.securityGroupLinks = Collections.singletonList(securityGroupState.documentSelfLink);
        }
        nicState.tagLinks = Collections.singleton(TagsUtil.newTagState(TAG_KEY_TYPE, azure_net_interface.name(), false, endpointState.tenantLinks).documentSelfLink);
        nicState = TestUtils.doPost(host, nicState, NetworkInterfaceState.class, UriUtils.buildUri(host, NetworkInterfaceService.FACTORY_LINK));
        nics.add(nicState);
    }
    return nics;
}
Also used : NetworkInterfaceDescription(com.vmware.photon.controller.model.resources.NetworkInterfaceDescriptionService.NetworkInterfaceDescription) NetworkInterfaceState(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState) SecurityGroupState(com.vmware.photon.controller.model.resources.SecurityGroupService.SecurityGroupState) ArrayList(java.util.ArrayList) SubnetState(com.vmware.photon.controller.model.resources.SubnetService.SubnetState) URI(java.net.URI) NicSpec(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.AzureNicSpecs.NicSpec) NetworkState(com.vmware.photon.controller.model.resources.NetworkService.NetworkState) Rule(com.vmware.photon.controller.model.resources.SecurityGroupService.SecurityGroupState.Rule) HashSet(java.util.HashSet)

Example 23 with NetworkInterfaceState

use of com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState in project photon-model by vmware.

the class VSphereAdapterInstanceService method updateNicsAfterProvisionSuccess.

/**
 * Update the details of nics into compute state after the provisioning is successful
 */
private void updateNicsAfterProvisionSuccess(List<VirtualEthernetCard> virtualEthernetCards, ProvisionContext ctx) {
    boolean changed = false;
    NetworkInterfaceState nic = null;
    if (ctx.nics.size() == 0) {
        return;
    }
    for (VirtualEthernetCard virtualEthernetCard : virtualEthernetCards) {
        VirtualDeviceBackingInfo deviceBackingInfo = virtualEthernetCard.getBacking();
        if (deviceBackingInfo instanceof VirtualEthernetCardDistributedVirtualPortBackingInfo) {
            VirtualEthernetCardDistributedVirtualPortBackingInfo info = (VirtualEthernetCardDistributedVirtualPortBackingInfo) deviceBackingInfo;
            String portGroupKey = info.getPort().getPortgroupKey();
            nic = findNic(ctx, DvsProperties.PORT_GROUP_KEY, portGroupKey);
        } else if (deviceBackingInfo instanceof VirtualEthernetCardOpaqueNetworkBackingInfo) {
            VirtualEthernetCardOpaqueNetworkBackingInfo info = (VirtualEthernetCardOpaqueNetworkBackingInfo) deviceBackingInfo;
            String opaqueNetworkId = info.getOpaqueNetworkId();
            nic = findNic(ctx, NsxProperties.OPAQUE_NET_ID, opaqueNetworkId);
        } else if (deviceBackingInfo instanceof VirtualEthernetCardNetworkBackingInfo) {
            VirtualEthernetCardNetworkBackingInfo info = (VirtualEthernetCardNetworkBackingInfo) deviceBackingInfo;
            String deviceName = info.getDeviceName();
            nic = ctx.nics.stream().filter(nics -> deviceName != null && nics.network != null && nics.network.name != null && nics.network.name.equals(deviceName)).findFirst().orElse(null);
        }
        if (nic != null) {
            if (nic.customProperties == null) {
                nic.customProperties = new HashMap<>(1);
            }
            if (!StringUtil.isNullOrEmpty(virtualEthernetCard.getExternalId())) {
                // Update nic external id
                nic.customProperties.put(CustomProperties.NIC_EXTERNAL_ID, virtualEthernetCard.getExternalId());
                changed = true;
            }
            if (!StringUtil.isNullOrEmpty(virtualEthernetCard.getMacAddress())) {
                // Update nic mac address
                nic.customProperties.put(CustomProperties.NIC_MAC_ADDRESS, virtualEthernetCard.getMacAddress());
                changed = true;
            }
            if (changed) {
                NetworkInterfaceState patchNic = new NetworkInterfaceState();
                patchNic.customProperties = nic.customProperties;
                Operation.createPatch(PhotonModelUriUtils.createInventoryUri(getHost(), nic.documentSelfLink)).setBody(patchNic).sendWith(this);
            }
        } else {
            log(Level.WARNING, "NetworkInterfaceState not found for vsphere network adapter " + "with mac address:" + " [%s]. The custom properties NIC_EXTERNAL_ID or NIC_MAC_ADDRESS were " + "not updated for: [%s]", virtualEthernetCard.getMacAddress(), ctx.nics.stream().map(ic -> ic.documentSelfLink).collect(Collectors.toList()).toString());
        }
    }
}
Also used : PowerState(com.vmware.photon.controller.model.resources.ComputeService.PowerState) IpAssignment(com.vmware.photon.controller.model.resources.NetworkInterfaceDescriptionService.IpAssignment) VirtualEthernetCardOpaqueNetworkBackingInfo(com.vmware.vim25.VirtualEthernetCardOpaqueNetworkBackingInfo) QueryTask(com.vmware.xenon.services.common.QueryTask) LifecycleState(com.vmware.photon.controller.model.resources.ComputeService.LifecycleState) DiskType(com.vmware.photon.controller.model.resources.DiskService.DiskType) SubnetState(com.vmware.photon.controller.model.resources.SubnetService.SubnetState) Map(java.util.Map) COMPUTE_HOST_LINK_PROP_NAME(com.vmware.photon.controller.model.ComputeProperties.COMPUTE_HOST_LINK_PROP_NAME) Connection(com.vmware.photon.controller.model.adapters.vsphere.util.connection.Connection) URI(java.net.URI) VirtualDevice(com.vmware.vim25.VirtualDevice) TaskInfo(com.vmware.vim25.TaskInfo) NsxProperties(com.vmware.photon.controller.model.adapters.vsphere.network.NsxProperties) CustomizationSpec(com.vmware.vim25.CustomizationSpec) DiskStateExpanded(com.vmware.photon.controller.model.resources.DiskService.DiskStateExpanded) NetworkInterfaceState(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState) StatelessService(com.vmware.xenon.common.StatelessService) Collection(java.util.Collection) TaskManager(com.vmware.photon.controller.model.adapters.util.TaskManager) Collectors(java.util.stream.Collectors) ClientUtils.handleVirtualDiskUpdate(com.vmware.photon.controller.model.adapters.vsphere.ClientUtils.handleVirtualDiskUpdate) List(java.util.List) InvalidPropertyFaultMsg(com.vmware.vim25.InvalidPropertyFaultMsg) DeferredResult(com.vmware.xenon.common.DeferredResult) ComputeService(com.vmware.photon.controller.model.resources.ComputeService) ClientUtils.handleVirtualDeviceUpdate(com.vmware.photon.controller.model.adapters.vsphere.ClientUtils.handleVirtualDeviceUpdate) VC_UUID(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.VC_UUID) VirtualFloppy(com.vmware.vim25.VirtualFloppy) VimPath(com.vmware.photon.controller.model.adapters.vsphere.util.VimPath) ComputeProperties(com.vmware.photon.controller.model.ComputeProperties) PhotonModelUriUtils(com.vmware.photon.controller.model.util.PhotonModelUriUtils) VirtualEthernetCardDistributedVirtualPortBackingInfo(com.vmware.vim25.VirtualEthernetCardDistributedVirtualPortBackingInfo) HashMap(java.util.HashMap) GetMoRef(com.vmware.photon.controller.model.adapters.vsphere.util.connection.GetMoRef) RuntimeFaultFaultMsg(com.vmware.vim25.RuntimeFaultFaultMsg) StringUtil(io.netty.util.internal.StringUtil) DvsProperties(com.vmware.photon.controller.model.adapters.vsphere.network.DvsProperties) VirtualEthernetCardNetworkBackingInfo(com.vmware.vim25.VirtualEthernetCardNetworkBackingInfo) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) ComputeInstanceRequest(com.vmware.photon.controller.model.adapterapi.ComputeInstanceRequest) VirtualCdrom(com.vmware.vim25.VirtualCdrom) ServiceStateCollectionUpdateRequest(com.vmware.xenon.common.ServiceStateCollectionUpdateRequest) ClientUtils.findMatchingDiskState(com.vmware.photon.controller.model.adapters.vsphere.ClientUtils.findMatchingDiskState) CollectionUtils(org.apache.commons.collections.CollectionUtils) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) DATACENTER_SELF_LINK(com.vmware.photon.controller.model.adapters.vsphere.CustomProperties.DATACENTER_SELF_LINK) Operation(com.vmware.xenon.common.Operation) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) VirtualDeviceBackingInfo(com.vmware.vim25.VirtualDeviceBackingInfo) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference) TaskStage(com.vmware.xenon.common.TaskState.TaskStage) NetworkInterfaceStateWithDetails(com.vmware.photon.controller.model.adapters.vsphere.ProvisionContext.NetworkInterfaceStateWithDetails) TimeUnit(java.util.concurrent.TimeUnit) VirtualDisk(com.vmware.vim25.VirtualDisk) ClusterUtil(com.vmware.photon.controller.model.util.ClusterUtil) VirtualEthernetCard(com.vmware.vim25.VirtualEthernetCard) Collections(java.util.Collections) TaskInfoState(com.vmware.vim25.TaskInfoState) OperationJoin(com.vmware.xenon.common.OperationJoin) VirtualEthernetCardDistributedVirtualPortBackingInfo(com.vmware.vim25.VirtualEthernetCardDistributedVirtualPortBackingInfo) VirtualEthernetCardOpaqueNetworkBackingInfo(com.vmware.vim25.VirtualEthernetCardOpaqueNetworkBackingInfo) VirtualEthernetCardNetworkBackingInfo(com.vmware.vim25.VirtualEthernetCardNetworkBackingInfo) NetworkInterfaceState(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState) VirtualDeviceBackingInfo(com.vmware.vim25.VirtualDeviceBackingInfo) VirtualEthernetCard(com.vmware.vim25.VirtualEthernetCard)

Example 24 with NetworkInterfaceState

use of com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState in project photon-model by vmware.

the class VSphereVirtualMachineEnumerationHelper method addNewInterfaceState.

/**
 * Add new interface state to compute network interface links
 * @param service
 * @param enumerationProgress Enumeration progress
 * @param state Compute state
 * @param id The id of distributed virtual port or opaque network
 * @param mode Either using distributed virtual port or opaque network
 * @param docType The document class type
 * @param type The type
 * @param ipAddress The primary ip address of this interface
 */
static <T> Operation addNewInterfaceState(VSphereIncrementalEnumerationService service, EnumerationProgress enumerationProgress, ComputeState state, String id, InterfaceStateMode mode, Class<? extends ServiceDocument> docType, Class<T> type, String ipAddress) {
    String fieldKey;
    String fieldValue;
    switch(mode) {
        case INTERFACE_STATE_WITH_DISTRIBUTED_VIRTUAL_PORT:
            {
                fieldKey = CustomProperties.MOREF;
                fieldValue = TYPE_PORTGROUP + ":" + id;
                break;
            }
        case INTERFACE_STATE_WITH_OPAQUE_NETWORK:
            {
                fieldKey = NsxProperties.OPAQUE_NET_ID;
                fieldValue = id;
                break;
            }
        default:
            {
                service.logFine(() -> String.format("invalid mode when creating compute state with " + "network interface links: [%s]", mode));
                return null;
            }
    }
    Operation operation = queryByPortGroupIdOrByOpaqueNetworkId(service, enumerationProgress, fieldKey, fieldValue, docType).setCompletion((o, e) -> {
        if (e != null) {
            service.logWarning(() -> String.format("Error processing queryByPortGroupIdOrByOpaqueNetworkId for id: [%s]," + "error: [%s]", fieldValue, e.toString()));
            return;
        }
        QueryTask task = o.getBody(QueryTask.class);
        if (task.results != null && !task.results.documentLinks.isEmpty()) {
            T netState = VsphereEnumerationHelper.convertOnlyResultToDocument(task.results, type);
            NetworkInterfaceState iface = null;
            if (netState instanceof SubnetState) {
                SubnetState subnetState = (SubnetState) netState;
                iface = createNewInterfaceState(service, id, subnetState.networkLink, subnetState.documentSelfLink, ipAddress);
            } else if (netState instanceof NetworkState) {
                NetworkState networkState = (NetworkState) netState;
                iface = createNewInterfaceState(service, id, null, networkState.documentSelfLink, ipAddress);
            }
            if (iface != null) {
                state.networkInterfaceLinks.add(iface.documentSelfLink);
            }
        } else {
            service.logFine(() -> String.format("Will not add nic with id: [%s]", fieldValue));
        }
    });
    return operation;
}
Also used : QueryTask(com.vmware.xenon.services.common.QueryTask) NetworkInterfaceState(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState) Operation(com.vmware.xenon.common.Operation) NetworkState(com.vmware.photon.controller.model.resources.NetworkService.NetworkState) SubnetState(com.vmware.photon.controller.model.resources.SubnetService.SubnetState)

Example 25 with NetworkInterfaceState

use of com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState in project photon-model by vmware.

the class VSphereVirtualMachineEnumerationHelper method createNewInterfaceState.

/**
 * Create new network interface state
 * @param service
 * @param id The id of the distributed virtual port or opaque network
 * @param networkLink The network link
 * @param subnetworkLink The subnetwork link
 * @return The network interface state
 */
static NetworkInterfaceState createNewInterfaceState(VSphereIncrementalEnumerationService service, String id, String networkLink, String subnetworkLink, String ipAddress) {
    NetworkInterfaceState iface = new NetworkInterfaceState();
    iface.name = id;
    iface.documentSelfLink = buildUriPath(NetworkInterfaceService.FACTORY_LINK, service.getHost().nextUUID());
    iface.networkLink = networkLink;
    iface.subnetLink = subnetworkLink;
    iface.address = ipAddress;
    Operation.createPost(PhotonModelUriUtils.createInventoryUri(service.getHost(), NetworkInterfaceService.FACTORY_LINK)).setBody(iface).sendWith(service);
    return iface;
}
Also used : NetworkInterfaceState(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState)

Aggregations

NetworkInterfaceState (com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState)32 ComputeState (com.vmware.photon.controller.model.resources.ComputeService.ComputeState)17 Operation (com.vmware.xenon.common.Operation)15 ArrayList (java.util.ArrayList)14 SubnetState (com.vmware.photon.controller.model.resources.SubnetService.SubnetState)13 URI (java.net.URI)10 HashSet (java.util.HashSet)10 ComputeService (com.vmware.photon.controller.model.resources.ComputeService)9 DeferredResult (com.vmware.xenon.common.DeferredResult)9 QueryTask (com.vmware.xenon.services.common.QueryTask)9 List (java.util.List)9 Map (java.util.Map)9 QueryUtils (com.vmware.photon.controller.model.query.QueryUtils)8 HashMap (java.util.HashMap)8 Collectors (java.util.stream.Collectors)8 ComputeDescription (com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription)7 DiskState (com.vmware.photon.controller.model.resources.DiskService.DiskState)7 NetworkState (com.vmware.photon.controller.model.resources.NetworkService.NetworkState)7 ResourceState (com.vmware.photon.controller.model.resources.ResourceState)7 OperationJoin (com.vmware.xenon.common.OperationJoin)7