Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Automation] SavedSearch Dynamic group Sdk change and other nit fixes #5187

Closed
wants to merge 1 commit into from
Closed
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 @@ -39,6 +39,7 @@ public void CanCreateGetAndDelete()
Assert.NotNull(getResult.UpdateConfiguration.Targets.AzureQueries);
Assert.Equal(1, getResult.UpdateConfiguration.Targets.AzureQueries.Count);
Assert.Equal(2, getResult.UpdateConfiguration.Targets.AzureQueries.First().Scope.Count);
Assert.Equal(2, getResult.UpdateConfiguration.Targets.NonAzureQueries.Count);
Assert.NotNull(getResult.Tasks);
Assert.NotNull(getResult.Tasks.PreTask);
Assert.Equal("preScript", getResult.Tasks.PreTask.Source);
Expand All @@ -52,14 +53,14 @@ public void CanCreateGetAndDelete()
var listResult = this.automationClient.SoftwareUpdateConfigurations.List(ResourceGroupName, AutomationAccountName);
Assert.NotNull(listResult);
Assert.NotNull(listResult.Value);
Assert.Equal(3, listResult.Value.Count);
Assert.Equal(5, listResult.Value.Count);


// List for specific VM
listResult = this.automationClient.SoftwareUpdateConfigurations.ListByAzureVirtualMachine(ResourceGroupName, AutomationAccountName, VM_01);
Assert.NotNull(listResult);
Assert.NotNull(listResult.Value);
Assert.Equal(3, listResult.Value.Count);
Assert.Equal(5, listResult.Value.Count);
var suc = listResult.Value.Where(v => v.Name.Equals(updateConfigurationName_01, StringComparison.OrdinalIgnoreCase)).Single();
Assert.Equal(updateConfigurationName_01, suc.Name);

Expand Down Expand Up @@ -130,6 +131,19 @@ private SoftwareUpdateConfiguration CreateSoftwareUpdateConfigurationModel(strin
FilterOperator = TagOperators.All
}
}
},
NonAzureQueries = new List<NonAzureQueryProperties>
{
new NonAzureQueryProperties
{
FunctionAlias = "SavedSearch1",
WorkspaceId = "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourcegroups/to-delete-01/providers/microsoft.operationalinsights/workspaces/fbs-aa-01"
},
new NonAzureQueryProperties
{
FunctionAlias = "SavedSearch2",
WorkspaceId = "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourcegroups/to-delete-01/providers/microsoft.operationalinsights/workspaces/fbs-aa-01"
}
}
}
};
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ internal ConnectionTypeOperations(AutomationClient client)
public AutomationClient Client { get; private set; }

/// <summary>
/// Delete the connectiontype.
/// Delete the connection type.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='resourceGroupName'>
Expand All @@ -61,7 +61,7 @@ internal ConnectionTypeOperations(AutomationClient client)
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The name of connectiontype.
/// The name of connection type.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
Expand Down Expand Up @@ -244,7 +244,7 @@ internal ConnectionTypeOperations(AutomationClient client)
}

/// <summary>
/// Retrieve the connectiontype identified by connectiontype name.
/// Retrieve the connection type identified by connection type name.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='resourceGroupName'>
Expand All @@ -254,7 +254,7 @@ internal ConnectionTypeOperations(AutomationClient client)
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The name of connectiontype.
/// The name of connection type.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
Expand Down Expand Up @@ -458,7 +458,7 @@ internal ConnectionTypeOperations(AutomationClient client)
}

/// <summary>
/// Create a connectiontype.
/// Create a connection type.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='resourceGroupName'>
Expand All @@ -468,10 +468,10 @@ internal ConnectionTypeOperations(AutomationClient client)
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The parameters supplied to the create or update connectiontype operation.
/// The parameters supplied to the create or update connection type operation.
/// </param>
/// <param name='parameters'>
/// The parameters supplied to the create or update connectiontype operation.
/// The parameters supplied to the create or update connection type operation.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
Expand Down Expand Up @@ -708,7 +708,7 @@ internal ConnectionTypeOperations(AutomationClient client)
}

/// <summary>
/// Retrieve a list of connectiontypes.
/// Retrieve a list of connection types.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='resourceGroupName'>
Expand Down Expand Up @@ -913,7 +913,7 @@ internal ConnectionTypeOperations(AutomationClient client)
}

/// <summary>
/// Retrieve a list of connectiontypes.
/// Retrieve a list of connection types.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='nextPageLink'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.Automation
public static partial class ConnectionTypeOperationsExtensions
{
/// <summary>
/// Delete the connectiontype.
/// Delete the connection type.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='operations'>
Expand All @@ -35,15 +35,15 @@ public static partial class ConnectionTypeOperationsExtensions
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The name of connectiontype.
/// The name of connection type.
/// </param>
public static void Delete(this IConnectionTypeOperations operations, string resourceGroupName, string automationAccountName, string connectionTypeName)
{
operations.DeleteAsync(resourceGroupName, automationAccountName, connectionTypeName).GetAwaiter().GetResult();
}

/// <summary>
/// Delete the connectiontype.
/// Delete the connection type.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='operations'>
Expand All @@ -56,7 +56,7 @@ public static void Delete(this IConnectionTypeOperations operations, string reso
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The name of connectiontype.
/// The name of connection type.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
Expand All @@ -67,7 +67,7 @@ public static void Delete(this IConnectionTypeOperations operations, string reso
}

/// <summary>
/// Retrieve the connectiontype identified by connectiontype name.
/// Retrieve the connection type identified by connection type name.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='operations'>
Expand All @@ -80,15 +80,15 @@ public static void Delete(this IConnectionTypeOperations operations, string reso
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The name of connectiontype.
/// The name of connection type.
/// </param>
public static ConnectionType Get(this IConnectionTypeOperations operations, string resourceGroupName, string automationAccountName, string connectionTypeName)
{
return operations.GetAsync(resourceGroupName, automationAccountName, connectionTypeName).GetAwaiter().GetResult();
}

/// <summary>
/// Retrieve the connectiontype identified by connectiontype name.
/// Retrieve the connection type identified by connection type name.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='operations'>
Expand All @@ -101,7 +101,7 @@ public static ConnectionType Get(this IConnectionTypeOperations operations, stri
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The name of connectiontype.
/// The name of connection type.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
Expand All @@ -115,7 +115,7 @@ public static ConnectionType Get(this IConnectionTypeOperations operations, stri
}

/// <summary>
/// Create a connectiontype.
/// Create a connection type.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='operations'>
Expand All @@ -128,18 +128,18 @@ public static ConnectionType Get(this IConnectionTypeOperations operations, stri
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The parameters supplied to the create or update connectiontype operation.
/// The parameters supplied to the create or update connection type operation.
/// </param>
/// <param name='parameters'>
/// The parameters supplied to the create or update connectiontype operation.
/// The parameters supplied to the create or update connection type operation.
/// </param>
public static ConnectionType CreateOrUpdate(this IConnectionTypeOperations operations, string resourceGroupName, string automationAccountName, string connectionTypeName, ConnectionTypeCreateOrUpdateParameters parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, automationAccountName, connectionTypeName, parameters).GetAwaiter().GetResult();
}

/// <summary>
/// Create a connectiontype.
/// Create a connection type.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='operations'>
Expand All @@ -152,10 +152,10 @@ public static ConnectionType CreateOrUpdate(this IConnectionTypeOperations opera
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The parameters supplied to the create or update connectiontype operation.
/// The parameters supplied to the create or update connection type operation.
/// </param>
/// <param name='parameters'>
/// The parameters supplied to the create or update connectiontype operation.
/// The parameters supplied to the create or update connection type operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
Expand All @@ -169,7 +169,7 @@ public static ConnectionType CreateOrUpdate(this IConnectionTypeOperations opera
}

/// <summary>
/// Retrieve a list of connectiontypes.
/// Retrieve a list of connection types.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='operations'>
Expand All @@ -187,7 +187,7 @@ public static IPage<ConnectionType> ListByAutomationAccount(this IConnectionType
}

/// <summary>
/// Retrieve a list of connectiontypes.
/// Retrieve a list of connection types.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='operations'>
Expand All @@ -211,7 +211,7 @@ public static IPage<ConnectionType> ListByAutomationAccount(this IConnectionType
}

/// <summary>
/// Retrieve a list of connectiontypes.
/// Retrieve a list of connection types.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='operations'>
Expand All @@ -226,7 +226,7 @@ public static IPage<ConnectionType> ListByAutomationAccountNext(this IConnection
}

/// <summary>
/// Retrieve a list of connectiontypes.
/// Retrieve a list of connection types.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='operations'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Automation
public partial interface IConnectionTypeOperations
{
/// <summary>
/// Delete the connectiontype.
/// Delete the connection type.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='resourceGroupName'>
Expand All @@ -34,7 +34,7 @@ public partial interface IConnectionTypeOperations
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The name of connectiontype.
/// The name of connection type.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand All @@ -50,7 +50,7 @@ public partial interface IConnectionTypeOperations
/// </exception>
Task<AzureOperationResponse> DeleteWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string connectionTypeName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Retrieve the connectiontype identified by connectiontype name.
/// Retrieve the connection type identified by connection type name.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='resourceGroupName'>
Expand All @@ -60,7 +60,7 @@ public partial interface IConnectionTypeOperations
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The name of connectiontype.
/// The name of connection type.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand All @@ -79,7 +79,7 @@ public partial interface IConnectionTypeOperations
/// </exception>
Task<AzureOperationResponse<ConnectionType>> GetWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string connectionTypeName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Create a connectiontype.
/// Create a connection type.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='resourceGroupName'>
Expand All @@ -89,11 +89,11 @@ public partial interface IConnectionTypeOperations
/// The name of the automation account.
/// </param>
/// <param name='connectionTypeName'>
/// The parameters supplied to the create or update connectiontype
/// The parameters supplied to the create or update connection type
/// operation.
/// </param>
/// <param name='parameters'>
/// The parameters supplied to the create or update connectiontype
/// The parameters supplied to the create or update connection type
/// operation.
/// </param>
/// <param name='customHeaders'>
Expand All @@ -113,7 +113,7 @@ public partial interface IConnectionTypeOperations
/// </exception>
Task<AzureOperationResponse<ConnectionType>> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, string connectionTypeName, ConnectionTypeCreateOrUpdateParameters parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Retrieve a list of connectiontypes.
/// Retrieve a list of connection types.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='resourceGroupName'>
Expand All @@ -139,7 +139,7 @@ public partial interface IConnectionTypeOperations
/// </exception>
Task<AzureOperationResponse<IPage<ConnectionType>>> ListByAutomationAccountWithHttpMessagesAsync(string resourceGroupName, string automationAccountName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Retrieve a list of connectiontypes.
/// Retrieve a list of connection types.
/// <see href="http://aka.ms/azureautomationsdk/connectiontypeoperations" />
/// </summary>
/// <param name='nextPageLink'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.Automation.Models
using System.Linq;

/// <summary>
/// Definition of the agent registration infomration type.
/// Definition of the agent registration information type.
/// </summary>
public partial class AgentRegistration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public DscConfigurationParameter()
/// </summary>
/// <param name="type">Gets or sets the type of the parameter.</param>
/// <param name="isMandatory">Gets or sets a Boolean value to indicate
/// whether the parameter is madatory or not.</param>
/// whether the parameter is mandatory or not.</param>
/// <param name="position">Get or sets the position of the
/// parameter.</param>
/// <param name="defaultValue">Gets or sets the default value of
Expand All @@ -58,7 +58,7 @@ public DscConfigurationParameter()

/// <summary>
/// Gets or sets a Boolean value to indicate whether the parameter is
/// madatory or not.
/// mandatory or not.
/// </summary>
[JsonProperty(PropertyName = "isMandatory")]
public bool? IsMandatory { get; set; }
Expand Down
Loading