Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
Release 1.36.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xseeseesee committed Jan 15, 2021
1 parent 97d4c20 commit e2710f5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
Binary file removed Asset/NetworkTestCertificate1.pfx
Binary file not shown.
Binary file removed Asset/NetworkTestCertificate2.pfx
Binary file not shown.
Binary file removed Asset/SampleTestCertificate.pfx
Binary file not shown.
13 changes: 12 additions & 1 deletion Common/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,16 @@ public static string CreateRandomName(string namePrefix)
return SdkContext.RandomResourceName(namePrefix, 30);
}

public static string CreatePassword()
{
return SdkContext.RandomResourceName("Pa5$", 15);
}

public static string CreateUsername()
{
return "tirekicker";
}

public static void PrintAvailabilitySet(IAvailabilitySet resource)
{
Utilities.Log(new StringBuilder().Append("Availability Set: ").Append(resource.Id)
Expand Down Expand Up @@ -3066,6 +3076,7 @@ public static string PostAddress(string url, string body, IDictionary<string, st

public static void DeprovisionAgentInLinuxVM(string host, int port, string userName, string password)
{
Utilities.Log("is mocked:" + IsRunningMocked);
if (!IsRunningMocked)
{
Console.WriteLine("Trying to de-provision: " + host);
Expand All @@ -3081,7 +3092,7 @@ public static void DeprovisionAgentInLinuxVM(string host, int port, string userN
public static string GetArmTemplate(string templateFileName)
{
var adminUsername = "tirekicker";
var adminPassword = "12NewPA$$w0rd!";
var adminPassword = CreatePassword();
var hostingPlanName = SdkContext.RandomResourceName("hpRSAT", 24);
var webAppName = SdkContext.RandomResourceName("wnRSAT", 24);
var armTemplateString = File.ReadAllText(Path.Combine(Utilities.ProjectPath, "Asset", templateFileName));
Expand Down
4 changes: 2 additions & 2 deletions ManageVirtualMachineWithUnmanagedDisks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.19" />
<PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.30.0" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.20" />
<PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.36.1" />
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.1" />
<PackageReference Include="CoreFTP" Version="1.2.0" />
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="0.0.2-preview" />
Expand Down
8 changes: 4 additions & 4 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace ManageVirtualMachineWithUnmanagedDisks
{
public class Program
{
private const string UserName = "tirekicker";
private const string Password = "12NewPA$$w0rd!";
private static readonly string UserName = Utilities.CreateUsername();
private static readonly string Password = Utilities.CreatePassword();
private const string DataDiskName = "disk2";

/**
Expand Down Expand Up @@ -51,7 +51,7 @@ public static void RunSample(IAzure azure)
.WithAdminUsername(UserName)
.WithAdminPassword(Password)
.WithUnmanagedDisks()
.WithSize(VirtualMachineSizeTypes.StandardD3V2)
.WithSize(VirtualMachineSizeTypes.Parse("Standard_D2a_v4"))
.Create();
var endTime = DateTimeOffset.Now.UtcDateTime;

Expand Down Expand Up @@ -167,7 +167,7 @@ public static void RunSample(IAzure azure)
.WithPopularLinuxImage(KnownLinuxVirtualMachineImage.UbuntuServer16_04_Lts)
.WithRootUsername(UserName)
.WithRootPassword(Password)
.WithSize(VirtualMachineSizeTypes.StandardD3V2)
.WithSize(VirtualMachineSizeTypes.Parse("Standard_D2a_v4"))
.Create();

Utilities.Log("Created a Linux VM (in the same virtual network): " + linuxVM.Id);
Expand Down

0 comments on commit e2710f5

Please sign in to comment.