diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ListVirtualMachineImages.java b/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ListVirtualMachineImages.java index 5c5996f57cad2..8c6c9c90214f8 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ListVirtualMachineImages.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ListVirtualMachineImages.java @@ -35,7 +35,7 @@ public static void main(String[] args) { //================================================================= // Authenticate - final File credFile = new File("my.azureauth"); + final File credFile = new File(System.getenv("AZURE_AUTH_LOCATION")); Azure azure = Azure .configure() diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageAvailabilitySet.java b/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageAvailabilitySet.java index c8d08408e45dc..dc4f59849f8dc 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageAvailabilitySet.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageAvailabilitySet.java @@ -54,7 +54,7 @@ public static void main(String[] args) { //============================================================= // Authenticate - final File credFile = new File("my.azureauth"); + final File credFile = new File(System.getenv("AZURE_AUTH_LOCATION")); Azure azure = Azure .configure() diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageVirtualMachine.java b/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageVirtualMachine.java index 1c79bfb7cacb4..ad5baef5d4614 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageVirtualMachine.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageVirtualMachine.java @@ -56,7 +56,7 @@ public static void main(String[] args) { //============================================================= // Authenticate - final File credFile = new File("my.azureauth"); + final File credFile = new File(System.getenv("AZURE_AUTH_LOCATION")); Azure azure = Azure .configure() diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageIPAddress.java b/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageIPAddress.java index f2dc9ae825404..4446df945cacc 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageIPAddress.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageIPAddress.java @@ -50,7 +50,7 @@ public static void main(String[] args) { //============================================================= // Authenticate - final File credFile = new File("my.azureauth"); + final File credFile = new File(System.getenv("AZURE_AUTH_LOCATION")); Azure azure = Azure .configure() diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageNetworkInterface.java b/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageNetworkInterface.java index f28adbe939b4d..111ad6857e40f 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageNetworkInterface.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageNetworkInterface.java @@ -56,7 +56,7 @@ public static void main(String[] args) { //============================================================= // Authenticate - final File credFile = new File("my.azureauth"); + final File credFile = new File(System.getenv("AZURE_AUTH_LOCATION")); Azure azure = Azure .configure() diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageNetworkSecurityGroup.java b/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageNetworkSecurityGroup.java index 46e6410b95dda..da4499f9c46a4 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageNetworkSecurityGroup.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageNetworkSecurityGroup.java @@ -61,7 +61,7 @@ public static void main(String[] args) { //============================================================= // Authenticate - final File credFile = new File("my.azureauth"); + final File credFile = new File(System.getenv("AZURE_AUTH_LOCATION")); Azure azure = Azure .configure() diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageVirtualNetwork.java b/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageVirtualNetwork.java index 3e6bd36b765e2..b036ee2a0523a 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageVirtualNetwork.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageVirtualNetwork.java @@ -58,7 +58,7 @@ public static void main(String[] args) { //============================================================= // Authenticate - final File credFile = new File("my.azureauth"); + final File credFile = new File(System.getenv("AZURE_AUTH_LOCATION")); Azure azure = Azure .configure() diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/storage/samples/ManageStorageAccount.java b/azure-samples/src/main/java/com/microsoft/azure/management/storage/samples/ManageStorageAccount.java index 71b87d4599228..dadfa5b75b1aa 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/storage/samples/ManageStorageAccount.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/storage/samples/ManageStorageAccount.java @@ -41,7 +41,7 @@ public static void main(String[] args) { try { - final File credFile = new File("my.azureauth"); + final File credFile = new File(System.getenv("AZURE_AUTH_LOCATION")); Azure azure = Azure .configure() diff --git a/azure/src/test/java/com/microsoft/azure/TestVirtualMachineSsh.java b/azure/src/test/java/com/microsoft/azure/TestVirtualMachineSsh.java index c9a2b7597c4f6..14731557eb2e9 100644 --- a/azure/src/test/java/com/microsoft/azure/TestVirtualMachineSsh.java +++ b/azure/src/test/java/com/microsoft/azure/TestVirtualMachineSsh.java @@ -51,6 +51,9 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc }finally { if(session != null) {session.disconnect();} } + + Assert.assertNotNull(vm.inner().osProfile().linuxConfiguration().ssh()); + Assert.assertTrue(vm.inner().osProfile().linuxConfiguration().ssh().publicKeys().size() > 0); return vm; }