Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class ImportAzureAutomationRunbook : AzureAutomationBaseCmdlet
Constants.RunbookType.Graph,
Constants.RunbookType.Python2,
Constants.RunbookType.Python3,
Constants.RunbookType.Powershell72,
Constants.RunbookType.PowerShell72,
IgnoreCase = true)]
[ValidateNotNullOrEmpty]
public string Type { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class NewAzureAutomationRunbook : AzureAutomationBaseCmdlet
Constants.RunbookType.Graph,
Constants.RunbookType.Python2,
Constants.RunbookType.Python3,
Constants.RunbookType.Powershell72,
Constants.RunbookType.PowerShell72,
IgnoreCase = true)]
[ValidateNotNullOrEmpty]
public string Type { get; set; }
Expand Down
26 changes: 13 additions & 13 deletions src/Automation/Automation/Common/AutomationPSClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public void DeleteAutomationAccount(string resourceGroupName, string automationA
#region Module

public Module CreateModule(string resourceGroupName, string automationAccountName, Uri contentLink,
string moduleName,bool isPowershell72Module = false)
string moduleName,bool IsPowerShell72Module = false)
{
ModuleCreateOrUpdateParameters moduleCreateOrUpdateParameters = new AutomationManagement.Models.ModuleCreateOrUpdateParameters()
{
Expand All @@ -342,7 +342,7 @@ public Module CreateModule(string resourceGroupName, string automationAccountNam
Version = null
},
};
if (isPowershell72Module)
if (IsPowerShell72Module)
{
this.automationManagementClient.PowerShell72Module.CreateOrUpdate(resourceGroupName,
automationAccountName,
Expand All @@ -358,15 +358,15 @@ public Module CreateModule(string resourceGroupName, string automationAccountNam
moduleCreateOrUpdateParameters
);
}
return this.GetModule(resourceGroupName, automationAccountName, moduleName, isPowershell72Module);
return this.GetModule(resourceGroupName, automationAccountName, moduleName, IsPowerShell72Module);
}

public Module GetModule(string resourceGroupName, string automationAccountName, string name, bool isPowershell72Module = false)
public Module GetModule(string resourceGroupName, string automationAccountName, string name, bool IsPowerShell72Module = false)
{
try
{
AutomationManagement.Models.Module module =null;
if (isPowershell72Module)
if (IsPowerShell72Module)
{
module = this.automationManagementClient.PowerShell72Module.Get(resourceGroupName, automationAccountName, name);
}
Expand All @@ -390,13 +390,13 @@ public Module GetModule(string resourceGroupName, string automationAccountName,
}

public IEnumerable<Module> ListModules(string resourceGroupName, string automationAccountName,
ref string nextLink, bool isPowershell72Module = false)
ref string nextLink, bool IsPowerShell72Module = false)
{
Rest.Azure.IPage<AutomationManagement.Models.Module> response;

if (string.IsNullOrEmpty(nextLink))
{
if (isPowershell72Module)
if (IsPowerShell72Module)
{
response = this.automationManagementClient.PowerShell72Module.ListByAutomationAccount(resourceGroupName, automationAccountName);
}
Expand All @@ -407,7 +407,7 @@ public IEnumerable<Module> ListModules(string resourceGroupName, string automati
}
else
{
if (isPowershell72Module)
if (IsPowerShell72Module)
{
response = this.automationManagementClient.PowerShell72Module.ListByAutomationAccountNext(nextLink);
}
Expand All @@ -422,7 +422,7 @@ public IEnumerable<Module> ListModules(string resourceGroupName, string automati
}

public Module UpdateModule(string resourceGroupName, string automationAccountName, string name,
Uri contentLinkUri, string contentLinkVersion, bool isPowershell72Module = false)
Uri contentLinkUri, string contentLinkVersion, bool IsPowerShell72Module = false)
{
try
{
Expand All @@ -441,7 +441,7 @@ public Module UpdateModule(string resourceGroupName, string automationAccountNam
};
if (contentLinkUri != null)
{
if (isPowershell72Module)
if (IsPowerShell72Module)
{
this.automationManagementClient.PowerShell72Module.CreateOrUpdate(resourceGroupName,
automationAccountName,
Expand All @@ -460,7 +460,7 @@ public Module UpdateModule(string resourceGroupName, string automationAccountNam
}

}
return this.GetModule(resourceGroupName, automationAccountName, name, isPowershell72Module);
return this.GetModule(resourceGroupName, automationAccountName, name, IsPowerShell72Module);
}
catch (ErrorResponseException cloudException)
{
Expand All @@ -475,11 +475,11 @@ public Module UpdateModule(string resourceGroupName, string automationAccountNam
}
}

public void DeleteModule(string resourceGroupName, string automationAccountName, string name, bool isPowershell72Module = false)
public void DeleteModule(string resourceGroupName, string automationAccountName, string name, bool IsPowerShell72Module = false)
{
try
{
if (isPowershell72Module)
if (IsPowerShell72Module)
{
this.automationManagementClient.PowerShell72Module.Delete(resourceGroupName, automationAccountName, name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Automation/Automation/Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static class RunbookType

public const string Python3 = "Python3";

public const string Powershell72 = "Powershell72";
public const string PowerShell72 = "PowerShell72";
}

public static class RuntimeVersion
Expand Down