mirror of https://github.com/apache/jclouds.git
parent
e1e89b5ffb
commit
bc520cfdf2
|
@ -150,13 +150,13 @@ public abstract class OSProfile {
|
||||||
|
|
||||||
public abstract String content();
|
public abstract String content();
|
||||||
|
|
||||||
@SerializedNames({"pass", "component", "settingName", "content"})
|
@SerializedNames({"passName", "componentName", "settingName", "content"})
|
||||||
public static AdditionalUnattendContent create(final String pass, final String component,
|
public static AdditionalUnattendContent create(final String passName, final String componentName,
|
||||||
final String settingName,
|
final String settingName,
|
||||||
final String content) {
|
final String content) {
|
||||||
|
|
||||||
return new AutoValue_OSProfile_WindowsConfiguration_AdditionalUnattendContent(
|
return new AutoValue_OSProfile_WindowsConfiguration_AdditionalUnattendContent(
|
||||||
pass, component, settingName, content);
|
passName, componentName, settingName, content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,6 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.azurecompute.arm.features;
|
package org.jclouds.azurecompute.arm.features;
|
||||||
|
|
||||||
import static com.google.common.collect.Iterables.isEmpty;
|
|
||||||
import static org.testng.Assert.assertEquals;
|
|
||||||
import static org.testng.Assert.assertNotNull;
|
|
||||||
import static org.testng.Assert.assertNull;
|
|
||||||
import static org.testng.Assert.assertTrue;
|
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
@ -59,6 +53,12 @@ import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.squareup.okhttp.mockwebserver.MockResponse;
|
import com.squareup.okhttp.mockwebserver.MockResponse;
|
||||||
|
|
||||||
|
import static com.google.common.collect.Iterables.isEmpty;
|
||||||
|
import static org.testng.Assert.assertEquals;
|
||||||
|
import static org.testng.Assert.assertNotNull;
|
||||||
|
import static org.testng.Assert.assertNull;
|
||||||
|
import static org.testng.Assert.assertTrue;
|
||||||
|
|
||||||
@Test(groups = "unit", testName = "VirtualMachineApiMockTest", singleThreaded = true)
|
@Test(groups = "unit", testName = "VirtualMachineApiMockTest", singleThreaded = true)
|
||||||
public class VirtualMachineApiMockTest extends BaseAzureComputeApiMockTest {
|
public class VirtualMachineApiMockTest extends BaseAzureComputeApiMockTest {
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ public class VirtualMachineApiMockTest extends BaseAzureComputeApiMockTest {
|
||||||
+ "\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}},"
|
+ "\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}},"
|
||||||
+ "\"dataDisks\":[{\"name\":\"mydatadisk1\",\"diskSizeGB\":\"1\",\"lun\":0,\"createOption\":\"Empty\",\"caching\":\"ReadWrite\",\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}}]},"
|
+ "\"dataDisks\":[{\"name\":\"mydatadisk1\",\"diskSizeGB\":\"1\",\"lun\":0,\"createOption\":\"Empty\",\"caching\":\"ReadWrite\",\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}}]},"
|
||||||
+ "\"osProfile\":{\"computerName\":\"windowsmachine\",\"adminUsername\":\"azureuser\",\"adminPassword\":\"password\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":false,"
|
+ "\"osProfile\":{\"computerName\":\"windowsmachine\",\"adminUsername\":\"azureuser\",\"adminPassword\":\"password\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":false,"
|
||||||
+ "\"winRM\":{\"listeners\":[{\"protocol\":\"https\",\"certificateUrl\":\"url-to-certificate\"}]},\"additionalUnattendContent\":[{\"pass\":\"oobesystem\",\"component\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"<XML unattend content>\"}],"
|
+ "\"winRM\":{\"listeners\":[{\"protocol\":\"https\",\"certificateUrl\":\"url-to-certificate\"}]},\"additionalUnattendContent\":[{\"passName\":\"oobesystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"<XML unattend content>\"}],"
|
||||||
+ "\"enableAutomaticUpdates\":true},"
|
+ "\"enableAutomaticUpdates\":true},"
|
||||||
+ "\"secrets\":[{\"sourceVault\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1\"},\"vaultCertificates\":[{\"certificateUrl\":\"https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION\",\"certificateStore\":\"CERTIFICATESTORENAME\"}]}]},"
|
+ "\"secrets\":[{\"sourceVault\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1\"},\"vaultCertificates\":[{\"certificateUrl\":\"https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION\",\"certificateStore\":\"CERTIFICATESTORENAME\"}]}]},"
|
||||||
+ "\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167\"}]},"
|
+ "\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167\"}]},"
|
||||||
|
@ -176,7 +176,7 @@ public class VirtualMachineApiMockTest extends BaseAzureComputeApiMockTest {
|
||||||
+ "\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}},"
|
+ "\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}},"
|
||||||
+ "\"dataDisks\":[{\"name\":\"mydatadisk1\",\"diskSizeGB\":\"1\",\"lun\":0,\"createOption\":\"Empty\",\"caching\":\"ReadWrite\",\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}}]},"
|
+ "\"dataDisks\":[{\"name\":\"mydatadisk1\",\"diskSizeGB\":\"1\",\"lun\":0,\"createOption\":\"Empty\",\"caching\":\"ReadWrite\",\"managedDisk\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk\",\"storageAccountType\":\"Standard_LRS\"}}]},"
|
||||||
+ "\"osProfile\":{\"computerName\":\"windowsmachine\",\"adminUsername\":\"azureuser\",\"adminPassword\":\"password\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":false,"
|
+ "\"osProfile\":{\"computerName\":\"windowsmachine\",\"adminUsername\":\"azureuser\",\"adminPassword\":\"password\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":false,"
|
||||||
+ "\"winRM\":{\"listeners\":[{\"protocol\":\"https\",\"certificateUrl\":\"url-to-certificate\"}]},\"additionalUnattendContent\":[{\"pass\":\"oobesystem\",\"component\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"<XML unattend content>\"}],"
|
+ "\"winRM\":{\"listeners\":[{\"protocol\":\"https\",\"certificateUrl\":\"url-to-certificate\"}]},\"additionalUnattendContent\":[{\"passName\":\"oobesystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"<XML unattend content>\"}],"
|
||||||
+ "\"enableAutomaticUpdates\":true},"
|
+ "\"enableAutomaticUpdates\":true},"
|
||||||
+ "\"secrets\":[{\"sourceVault\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1\"},\"vaultCertificates\":[{\"certificateUrl\":\"https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION\",\"certificateStore\":\"CERTIFICATESTORENAME\"}]}]},"
|
+ "\"secrets\":[{\"sourceVault\":{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/myresourcegroup1/providers/Microsoft.KeyVault/vaults/myvault1\"},\"vaultCertificates\":[{\"certificateUrl\":\"https://myvault1.vault.azure.net/secrets/SECRETNAME/SECRETVERSION\",\"certificateStore\":\"CERTIFICATESTORENAME\"}]}]},"
|
||||||
+ "\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167\"}]},"
|
+ "\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"/subscriptions/SUBSCRIPTIONID/resourceGroups/groupname/providers/Microsoft.Network/networkInterfaces/windowsmachine167\"}]},"
|
||||||
|
|
|
@ -58,8 +58,8 @@
|
||||||
},
|
},
|
||||||
"additionalUnattendContent": [
|
"additionalUnattendContent": [
|
||||||
{
|
{
|
||||||
"pass":"oobesystem",
|
"passName":"oobesystem",
|
||||||
"component":"Microsoft-Windows-Shell-Setup",
|
"componentName":"Microsoft-Windows-Shell-Setup",
|
||||||
"settingName":"FirstLogonCommands",
|
"settingName":"FirstLogonCommands",
|
||||||
"content":"<XML unattend content>"
|
"content":"<XML unattend content>"
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,8 +57,8 @@
|
||||||
},
|
},
|
||||||
"additionalUnattendContent":[
|
"additionalUnattendContent":[
|
||||||
{
|
{
|
||||||
"pass":"oobesystem",
|
"passName":"oobesystem",
|
||||||
"component":"Microsoft-Windows-Shell-Setup",
|
"componentName":"Microsoft-Windows-Shell-Setup",
|
||||||
"settingName":"FirstLogonCommands",
|
"settingName":"FirstLogonCommands",
|
||||||
"content":"<XML unattend content>"
|
"content":"<XML unattend content>"
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,8 +58,8 @@
|
||||||
},
|
},
|
||||||
"additionalUnattendContent":[
|
"additionalUnattendContent":[
|
||||||
{
|
{
|
||||||
"pass":"oobesystem",
|
"passName":"oobesystem",
|
||||||
"component":"Microsoft-Windows-Shell-Setup",
|
"componentName":"Microsoft-Windows-Shell-Setup",
|
||||||
"settingName":"FirstLogonCommands",
|
"settingName":"FirstLogonCommands",
|
||||||
"content":"<XML unattend content>"
|
"content":"<XML unattend content>"
|
||||||
}
|
}
|
||||||
|
@ -158,8 +158,8 @@
|
||||||
},
|
},
|
||||||
"additionalUnattendContent":[
|
"additionalUnattendContent":[
|
||||||
{
|
{
|
||||||
"pass":"oobesystem",
|
"passName":"oobesystem",
|
||||||
"component":"Microsoft-Windows-Shell-Setup",
|
"componentName":"Microsoft-Windows-Shell-Setup",
|
||||||
"settingName":"FirstLogonCommands",
|
"settingName":"FirstLogonCommands",
|
||||||
"content":"<XML unattend content>"
|
"content":"<XML unattend content>"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue