Examples of addUploadFile()


Examples of org.openstack.model.compute.ServerForCreate.addUploadFile()

            KeyPair keyPair = cloudHelpers.ensurePublicKeyUploaded(computeClient, request.sshPublicKeyName,
                request.sshPublicKey);
            create.setKeyName(keyPair.getName());
          } else if (cloudBehaviours.supportsFileInjection()) {
            String fileContents = SshKeys.serialize(request.sshPublicKey);
            create.addUploadFile("/root/.ssh/authorized_keys", Utf8.getBytes(fileContents));
          } else {
            throw new OpsException("No supported SSH key mechanism on cloud");
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.