Skip to content

Fix Set-AzureRmOperationalInsightsSavedSearch ETag #3184

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

Merged
merged 1 commit into from
Nov 10, 2016
Merged
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 @@ -18,7 +18,7 @@ Get and update search results
#>
function Test-SearchGetSearchResultsAndUpdate
{
$rgname = "mms-eus"
$rgname = "mms-eus"
$wsname = "188087e4-5850-4d8b-9d08-3e5b448eaecd"

$top = 5
Expand All @@ -45,9 +45,15 @@ Get schemas for a given workspace
#>
function Test-SearchGetSchema
{
$rgname = "mms-eus"
$wsname = "188087e4-5850-4d8b-9d08-3e5b448eaecd"
$wsname = Get-ResourceName
$dsName = Get-ResourceName
$rgname = Get-ResourceGroupName
$wslocation = Get-ProviderLocation

New-AzureRmResourceGroup -Name $rgname -Location $wslocation -Force

# Create a workspace to house the data sources
$workspace = New-AzureRmOperationalInsightsWorkspace -ResourceGroupName $rgname -Name $wsname -Location $wslocation -Sku premium -Force
$schema = Get-AzureRmOperationalInsightsSchema -ResourceGroupName $rgname -WorkspaceName $wsname
Assert-NotNull $schema
Assert-NotNull $schema.Metadata
Expand All @@ -61,7 +67,7 @@ Get saved searches and search results from a saved search
#>
function Test-SearchGetSavedSearchesAndResults
{
$rgname = "mms-eus"
$rgname = "mms-eus"
$wsname = "188087e4-5850-4d8b-9d08-3e5b448eaecd"

$savedSearches = Get-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname
Expand Down Expand Up @@ -93,8 +99,15 @@ Create a new saved search, update, and then remove it
#>
function Test-SearchSetAndRemoveSavedSearches
{
$rgname = "mms-eus"
$wsname = "188087e4-5850-4d8b-9d08-3e5b448eaecd"
$wsname = Get-ResourceName
$dsName = Get-ResourceName
$rgname = Get-ResourceGroupName
$wslocation = Get-ProviderLocation

New-AzureRmResourceGroup -Name $rgname -Location $wslocation -Force

# Create a workspace to house the data sources
$workspace = New-AzureRmOperationalInsightsWorkspace -ResourceGroupName $rgname -Name $wsname -Location $wslocation -Sku premium -Force

$id = "test-new-saved-search-id-2015"
$displayName = "TestingSavedSearch"
Expand Down Expand Up @@ -124,8 +137,8 @@ function Test-SearchSetAndRemoveSavedSearches

#Set saved search cmdlet has issue with Etag. Temporarily comment out the call until it's fixed.
# Test updating the search
#$query = "* | distinct Computer"
#Set-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname -SavedSearchId $id -DisplayName $displayName -Category $category -Query $query -Tags $tags -Version $version -ETag $etag
$query = "* | distinct Computer"
Set-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname -SavedSearchId $id -DisplayName $displayName -Category $category -Query $query -Tags $tags -Version $version -ETag $etag

# Check that the search was updated
$savedSearches = Get-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $rgname -WorkspaceName $wsname
Expand Down

Large diffs are not rendered by default.

Loading