Package org.platformlayer.ops

Examples of org.platformlayer.ops.MachineCreationRequest


    // We always want some basics available in our images
    packages.add("curl");

    String hostname = "openstack";

    MachineCreationRequest request = new MachineCreationRequest();

    SshKey sshKey = service.getSshKey();

    // There are problems using LXC with debootstrap
    request.hostPolicy = new HostPolicy();
View Full Code Here


    getRecursionState().pushChildScope(cloud);

    List<String> assignedInstanceIds = instanceTags.findAll(Tag.ASSIGNED);
    if (assignedInstanceIds.isEmpty()) {
      if (createInstance && !OpsContext.isDelete()) {
        MachineCreationRequest request = buildMachineCreationRequest();

        PlatformLayerKey instanceKey = instance.getKey();
        request.tags.add(Tag.buildParentTag(instanceKey));

        String serverName = buildServerName();
View Full Code Here

    }
    return serverName;
  }

  private MachineCreationRequest buildMachineCreationRequest() throws IOException {
    MachineCreationRequest request = new MachineCreationRequest();
    request.sshPublicKey = OpenSshUtils.readSshPublicKey(instance.sshPublicKey);
    request.minimumMemoryMB = instance.minimumMemoryMb;
    request.recipeId = instance.recipeId;
    // request.securityGroups;
    request.hostPolicy = instance.hostPolicy;
View Full Code Here

    }

    if (!OpsContext.isDelete()) {
      // We always PUT the machine
      // TODO: Check if unchanged??
      MachineCreationRequest request = buildMachineCreationRequest(model);
      request.tags.add(tagForInstance);

      machine = cloudHelpers.putInstanceByTag(request, model.getKey(), tagForInstance);

      // if (machine == null) {
View Full Code Here

    getRecursionState().pushChildScope(Machine.class, machine);
  }

  private MachineCreationRequest buildMachineCreationRequest(PersistentInstance model) throws OpsException {
    MachineCreationRequest request = new MachineCreationRequest();
    try {
      request.sshPublicKey = OpenSshUtils.readSshPublicKey(model.sshPublicKey);
    } catch (IOException e) {
      throw new OpsException("Error reading sshPublicKey", e);
    }
View Full Code Here

    getRecursionState().pushChildScope(cloud);

    List<String> assignedInstanceIds = instanceTags.findAll(Tag.ASSIGNED);
    if (assignedInstanceIds.isEmpty()) {
      if (createInstance && !OpsContext.isDelete()) {
        MachineCreationRequest request = buildMachineCreationRequest();

        PlatformLayerKey instanceKey = instance.getKey();
        request.tags.add(Tag.buildParentTag(instanceKey));

        PublicKey servicePublicKey = service.getSshKey().getKeyPair().getPublic();
View Full Code Here

      recursion.pushChildScope(target);
    }
  }

  private MachineCreationRequest buildMachineCreationRequest() throws IOException {
    MachineCreationRequest request = new MachineCreationRequest();
    request.sshPublicKey = OpenSshUtils.readSshPublicKey(instance.sshPublicKey);
    request.minimumMemoryMB = instance.minimumMemoryMb;
    request.recipeId = instance.recipeId;
    // request.securityGroups;
    request.hostPolicy = instance.hostPolicy;
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.MachineCreationRequest

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.