SshSettingKeyPair keyPair = new SshSettingKeyPair(); keyPairs.add(keyPair); keyPair.setFingerprint(getFingerprint(vmName)); keyPair.setPath("/home/"+adminUserName+"/.ssh/authorized_keys"); //TODO: update for windows configurationSet.setSshSettings(ssh);
/** * Initializes a new instance of the SshSettingKeyPair class with required * arguments. * * @param fingerprint Specifies the SHA1 fingerprint of an X509 certificate * associated with the hosted service that includes the SSH key pair. * @param path Specifies the full path of a file on the virtual machine * which stores the SSH private key. The file is overwritten when multiple * keys are written to it. The SSH public key is stored in the same * directory and has the same name as the private key file with .pub * suffix. Example: /home/user/.ssh/id_rsa. */ public SshSettingKeyPair(String fingerprint, String path) { if (fingerprint == null) { throw new NullPointerException("fingerprint"); } if (path == null) { throw new NullPointerException("path"); } this.setFingerprint(fingerprint); this.setPath(path); } }
if (configurationSetsParameterItem.getSshSettings().getKeyPairs() != null) { for (SshSettingKeyPair keyPairsParameterItem : configurationSetsParameterItem.getSshSettings().getKeyPairs()) { if (keyPairsParameterItem.getFingerprint() == null) { throw new NullPointerException("parameters.ConfigurationSets.SshSettings.KeyPairs.Fingerprint"); if (keyPairsParameterItem.getPath() == null) { throw new NullPointerException("parameters.ConfigurationSets.SshSettings.KeyPairs.Path"); fingerprintElement2.appendChild(requestDoc.createTextNode(keyPairsItem.getFingerprint())); keyPairElement.appendChild(fingerprintElement2); pathElement3.appendChild(requestDoc.createTextNode(keyPairsItem.getPath())); keyPairElement.appendChild(pathElement3);
if (configurationSetsParameterItem.getSshSettings().getKeyPairs() != null) { for (SshSettingKeyPair keyPairsParameterItem : configurationSetsParameterItem.getSshSettings().getKeyPairs()) { if (keyPairsParameterItem.getFingerprint() == null) { throw new NullPointerException("parameters.ConfigurationSets.SshSettings.KeyPairs.Fingerprint"); if (keyPairsParameterItem.getPath() == null) { throw new NullPointerException("parameters.ConfigurationSets.SshSettings.KeyPairs.Path"); fingerprintElement2.appendChild(requestDoc.createTextNode(keyPairsItem.getFingerprint())); keyPairElement.appendChild(fingerprintElement2); pathElement3.appendChild(requestDoc.createTextNode(keyPairsItem.getPath())); keyPairElement.appendChild(pathElement3);
for (int i8 = 0; i8 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i8 = i8 + 1) { org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i8)); SshSettingKeyPair keyPairInstance = new SshSettingKeyPair(); sSHInstance.getKeyPairs().add(keyPairInstance); String fingerprintInstance2; fingerprintInstance2 = fingerprintElement2.getTextContent(); keyPairInstance.setFingerprint(fingerprintInstance2); String pathInstance3; pathInstance3 = pathElement3.getTextContent(); keyPairInstance.setPath(pathInstance3);
if (configurationSetsParameterItem.getSshSettings().getKeyPairs() != null) { for (SshSettingKeyPair keyPairsParameterItem : configurationSetsParameterItem.getSshSettings().getKeyPairs()) { if (keyPairsParameterItem.getFingerprint() == null) { throw new NullPointerException("parameters.Roles.ConfigurationSets.SshSettings.KeyPairs.Fingerprint"); if (keyPairsParameterItem.getPath() == null) { throw new NullPointerException("parameters.Roles.ConfigurationSets.SshSettings.KeyPairs.Path"); fingerprintElement2.appendChild(requestDoc.createTextNode(keyPairsItem.getFingerprint())); keyPairElement.appendChild(fingerprintElement2); pathElement3.appendChild(requestDoc.createTextNode(keyPairsItem.getPath())); keyPairElement.appendChild(pathElement3);
for (int i14 = 0; i14 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i14 = i14 + 1) { org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i14)); SshSettingKeyPair keyPairInstance = new SshSettingKeyPair(); sSHInstance.getKeyPairs().add(keyPairInstance); String fingerprintInstance2; fingerprintInstance2 = fingerprintElement2.getTextContent(); keyPairInstance.setFingerprint(fingerprintInstance2); String pathInstance3; pathInstance3 = pathElement3.getTextContent(); keyPairInstance.setPath(pathInstance3);
if (parameters.getProvisioningConfiguration().getSshSettings().getKeyPairs() != null) { for (SshSettingKeyPair keyPairsParameterItem : parameters.getProvisioningConfiguration().getSshSettings().getKeyPairs()) { if (keyPairsParameterItem.getFingerprint() == null) { throw new NullPointerException("parameters.ProvisioningConfiguration.SshSettings.KeyPairs.Fingerprint"); if (keyPairsParameterItem.getPath() == null) { throw new NullPointerException("parameters.ProvisioningConfiguration.SshSettings.KeyPairs.Path"); fingerprintElement2.appendChild(requestDoc.createTextNode(keyPairsItem.getFingerprint())); keyPairElement.appendChild(fingerprintElement2); pathElement3.appendChild(requestDoc.createTextNode(keyPairsItem.getPath())); keyPairElement.appendChild(pathElement3);
for (int i17 = 0; i17 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i17 = i17 + 1) { org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i17)); SshSettingKeyPair keyPairInstance = new SshSettingKeyPair(); sSHInstance.getKeyPairs().add(keyPairInstance); String fingerprintInstance2; fingerprintInstance2 = fingerprintElement2.getTextContent(); keyPairInstance.setFingerprint(fingerprintInstance2); String pathInstance3; pathInstance3 = pathElement3.getTextContent(); keyPairInstance.setPath(pathInstance3);
if (configurationSetsParameterItem.getSshSettings().getKeyPairs() != null) { for (SshSettingKeyPair keyPairsParameterItem : configurationSetsParameterItem.getSshSettings().getKeyPairs()) { if (keyPairsParameterItem.getFingerprint() == null) { throw new NullPointerException("parameters.ConfigurationSets.SshSettings.KeyPairs.Fingerprint"); if (keyPairsParameterItem.getPath() == null) { throw new NullPointerException("parameters.ConfigurationSets.SshSettings.KeyPairs.Path"); fingerprintElement2.appendChild(requestDoc.createTextNode(keyPairsItem.getFingerprint())); keyPairElement.appendChild(fingerprintElement2); pathElement3.appendChild(requestDoc.createTextNode(keyPairsItem.getPath())); keyPairElement.appendChild(pathElement3);
for (int i27 = 0; i27 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i27 = i27 + 1) { org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i27)); SshSettingKeyPair keyPairInstance = new SshSettingKeyPair(); sSHInstance.getKeyPairs().add(keyPairInstance); String fingerprintInstance2; fingerprintInstance2 = fingerprintElement2.getTextContent(); keyPairInstance.setFingerprint(fingerprintInstance2); String pathInstance3; pathInstance3 = pathElement3.getTextContent(); keyPairInstance.setPath(pathInstance3);
if (configurationSetsParameterItem.getSshSettings().getKeyPairs() != null) { for (SshSettingKeyPair keyPairsParameterItem : configurationSetsParameterItem.getSshSettings().getKeyPairs()) { if (keyPairsParameterItem.getFingerprint() == null) { throw new NullPointerException("parameters.ConfigurationSets.SshSettings.KeyPairs.Fingerprint"); if (keyPairsParameterItem.getPath() == null) { throw new NullPointerException("parameters.ConfigurationSets.SshSettings.KeyPairs.Path"); fingerprintElement2.appendChild(requestDoc.createTextNode(keyPairsItem.getFingerprint())); keyPairElement.appendChild(fingerprintElement2); pathElement3.appendChild(requestDoc.createTextNode(keyPairsItem.getPath())); keyPairElement.appendChild(pathElement3);
for (int i28 = 0; i28 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i28 = i28 + 1) { org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i28)); SshSettingKeyPair keyPairInstance = new SshSettingKeyPair(); sSHInstance.getKeyPairs().add(keyPairInstance); String fingerprintInstance2; fingerprintInstance2 = fingerprintElement2.getTextContent(); keyPairInstance.setFingerprint(fingerprintInstance2); String pathInstance3; pathInstance3 = pathElement3.getTextContent(); keyPairInstance.setPath(pathInstance3);
if (configurationSetsParameterItem.getSshSettings().getKeyPairs() != null) { for (SshSettingKeyPair keyPairsParameterItem : configurationSetsParameterItem.getSshSettings().getKeyPairs()) { if (keyPairsParameterItem.getFingerprint() == null) { throw new NullPointerException("parameters.Roles.ConfigurationSets.SshSettings.KeyPairs.Fingerprint"); if (keyPairsParameterItem.getPath() == null) { throw new NullPointerException("parameters.Roles.ConfigurationSets.SshSettings.KeyPairs.Path"); fingerprintElement2.appendChild(requestDoc.createTextNode(keyPairsItem.getFingerprint())); keyPairElement.appendChild(fingerprintElement2); pathElement3.appendChild(requestDoc.createTextNode(keyPairsItem.getPath())); keyPairElement.appendChild(pathElement3);
for (int i17 = 0; i17 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i17 = i17 + 1) { org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i17)); SshSettingKeyPair keyPairInstance = new SshSettingKeyPair(); sSHInstance.getKeyPairs().add(keyPairInstance); String fingerprintInstance2; fingerprintInstance2 = fingerprintElement2.getTextContent(); keyPairInstance.setFingerprint(fingerprintInstance2); String pathInstance3; pathInstance3 = pathElement3.getTextContent(); keyPairInstance.setPath(pathInstance3);
if (parameters.getProvisioningConfiguration().getSshSettings().getKeyPairs() != null) { for (SshSettingKeyPair keyPairsParameterItem : parameters.getProvisioningConfiguration().getSshSettings().getKeyPairs()) { if (keyPairsParameterItem.getFingerprint() == null) { throw new NullPointerException("parameters.ProvisioningConfiguration.SshSettings.KeyPairs.Fingerprint"); if (keyPairsParameterItem.getPath() == null) { throw new NullPointerException("parameters.ProvisioningConfiguration.SshSettings.KeyPairs.Path"); fingerprintElement2.appendChild(requestDoc.createTextNode(keyPairsItem.getFingerprint())); keyPairElement.appendChild(fingerprintElement2); pathElement3.appendChild(requestDoc.createTextNode(keyPairsItem.getPath())); keyPairElement.appendChild(pathElement3);
for (int i18 = 0; i18 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i18 = i18 + 1) { org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i18)); SshSettingKeyPair keyPairInstance = new SshSettingKeyPair(); sSHInstance.getKeyPairs().add(keyPairInstance); String fingerprintInstance2; fingerprintInstance2 = fingerprintElement2.getTextContent(); keyPairInstance.setFingerprint(fingerprintInstance2); String pathInstance3; pathInstance3 = pathElement3.getTextContent(); keyPairInstance.setPath(pathInstance3);
for (int i27 = 0; i27 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").size(); i27 = i27 + 1) { org.w3c.dom.Element keyPairsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(keyPairsSequenceElement, "http://schemas.microsoft.com/windowsazure", "KeyPair").get(i27)); SshSettingKeyPair keyPairInstance = new SshSettingKeyPair(); sSHInstance.getKeyPairs().add(keyPairInstance); String fingerprintInstance2; fingerprintInstance2 = fingerprintElement2.getTextContent(); keyPairInstance.setFingerprint(fingerprintInstance2); String pathInstance3; pathInstance3 = pathElement3.getTextContent(); keyPairInstance.setPath(pathInstance3);