Package io.fathom.cloud.compute.api.aws.ec2.model

Examples of io.fathom.cloud.compute.api.aws.ec2.model.Instance$StateReason


    protected List<Group> buildGroupsXml(List<SecurityGroupData> groups) {
        List<Group> xml = Lists.newArrayList();

        for (SecurityGroupData group : groups) {
            Group groupXml = new Group();
            xml.add(groupXml);

            groupXml.groupId = toEc2SecurityGroupId(group.getId());
            groupXml.groupName = group.getName();
        }
View Full Code Here


                sb.append(":");
            }
            sb.append(Hex.toHex(hashBytes[i]));
        }

        ImportKeyPairResponse response = new ImportKeyPairResponse();
        response.requestId = getRequestId();
        response.keyName = keyName;

        response.keyFingerprint = sb.toString().toLowerCase();
View Full Code Here

        }
        return s;
    }

    protected Instance buildRunningInstanceXml(ReservationData reservationInfo, InstanceData instanceInfo) {
        Instance instance = new Instance();
        instance.instanceId = toEc2InstanceId(instanceInfo.getId());
        instance.imageId = toEc2ImageId(reservationInfo.getImageId());

        instance.instanceState = buildInstanceState(instanceInfo);
View Full Code Here

                reservation.groups = buildGroupsXml(groups);

                reservation.instances = Lists.newArrayList();
            }

            Instance instance = buildRunningInstanceXml(reservationInfo, instanceInfo);
            reservation.instances.add(instance);

            instance.groups = reservation.groups;
        }
View Full Code Here

        response.groups = buildGroupsXml(securityGroups);

        response.instances = Lists.newArrayList();

        for (InstanceData instanceInfo : result.instances) {
            Instance instance = buildRunningInstanceXml(result.reservation, instanceInfo);
            response.instances.add(instance);

            instance.groups = response.groups;
        }
View Full Code Here

        instance.placement = new Placement();
        instance.placement.availabilityZone = "main";
        instance.placement.tenancy = "default";

        instance.monitoring = new Monitoring();
        instance.monitoring.state = "disabled";

        instance.architecture = "x86_64";
        instance.rootDeviceType = "instance-store";
        instance.virtualizationType = "paravirtual";
View Full Code Here

        instance.instanceType = "m1.small";
        Date launchTime = new Date(instanceInfo.getLaunchTime());
        instance.launchTime = launchTime;

        instance.placement = new Placement();
        instance.placement.availabilityZone = "main";
        instance.placement.tenancy = "default";

        instance.monitoring = new Monitoring();
        instance.monitoring.state = "disabled";
View Full Code Here

        instance.instanceState = buildInstanceState(instanceInfo);

        switch (instanceInfo.getInstanceState()) {
        case PENDING:
            instance.stateReason = new StateReason();
            instance.stateReason.code = "pending";
            instance.stateReason.message = "pending";
            break;

        case RUNNING:
View Full Code Here

        CloudModel.InstanceState state = instanceInfo.getInstanceState();
        return buildInstanceState(state);
    }

    protected InstanceState buildInstanceState(CloudModel.InstanceState state) {
        InstanceState instanceState = new InstanceState();
        switch (state) {
        case PENDING:
            instanceState.code = 0;
            instanceState.name = "pending";
View Full Code Here

        }

        asyncTasks.stopInstances(stopInstances);
        for (InstanceData instance : stopInstances) {
            // This is a very abbreviated state
            InstanceStateChange instanceStateChange = new InstanceStateChange();
            instanceStateChange.instanceId = toEc2InstanceId(instance.getId());

            instanceStateChange.currentState = buildInstanceState(instance);
            instanceStateChange.previousState = buildInstanceState(CloudModel.InstanceState.STOPPING);
View Full Code Here

TOP

Related Classes of io.fathom.cloud.compute.api.aws.ec2.model.Instance$StateReason

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.