Skip to content

Commit 1fe0246

Browse files
authored
Merge pull request Azure#145 from Azure/fixgalleryrename
Change New-AzsGalleryItem to Add-AzsGalleryItem
2 parents 4ea2691 + 67c12c8 commit 1fe0246

File tree

6 files changed

+23
-24
lines changed

6 files changed

+23
-24
lines changed

src/Azs.Gallery.Admin/docs/New-AzsGalleryItem.md renamed to src/Azs.Gallery.Admin/docs/Add-AzsGalleryItem.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
external help file:
33
Module Name: Azs.Gallery.Admin
4-
online version: https://docs.microsoft.com/en-us/powershell/module/azs.gallery.admin/new-azsgalleryitem
4+
online version: https://docs.microsoft.com/en-us/powershell/module/azs.gallery.admin/add-azsgalleryitem
55
schema: 2.0.0
66
---
77

8-
# New-AzsGalleryItem
8+
# Add-AzsGalleryItem
99

1010
## SYNOPSIS
1111
Uploads a provider gallery item to the storage.
@@ -14,13 +14,13 @@ Uploads a provider gallery item to the storage.
1414

1515
### CreateExpanded (Default)
1616
```
17-
New-AzsGalleryItem [-SubscriptionId <String>] [-GalleryItemUri <String>] [-DefaultProfile <PSObject>]
17+
Add-AzsGalleryItem [-SubscriptionId <String>] [-GalleryItemUri <String>] [-DefaultProfile <PSObject>]
1818
[-Confirm] [-WhatIf] [<CommonParameters>]
1919
```
2020

2121
### Create
2222
```
23-
New-AzsGalleryItem -GalleryItemUriPayload <IGalleryItemUriPayload> [-SubscriptionId <String>]
23+
Add-AzsGalleryItem -GalleryItemUriPayload <IGalleryItemUriPayload> [-SubscriptionId <String>]
2424
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
2525
```
2626

@@ -29,9 +29,9 @@ Uploads a provider gallery item to the storage.
2929

3030
## EXAMPLES
3131

32-
### Example 1: New-AzsGalleryItem
32+
### Example 1: Add-AzsGalleryItem
3333
```powershell
34-
PS C:\> New-AzsGalleryItem -GalleryItemUri https://testsa.blob.redmond.ext-n35r1010.masd.stbtest.microsoft.com/testsc/TestUbuntu.Test.1.0.0.azpkg
34+
PS C:\> Add-AzsGalleryItem -GalleryItemUri https://testsa.blob.redmond.ext-n35r1010.masd.stbtest.microsoft.com/testsc/TestUbuntu.Test.1.0.0.azpkg
3535
3636
Name Publisher PublisherDisplayName ItemName ItemDisplayName Version Summary
3737
---- --------- -------------------- -------- --------------- ------- -------
@@ -164,4 +164,3 @@ To create the parameters described below, construct a hash table containing the
164164
- `[GalleryItemUri <String>]`: URI for your gallery package that has already been uploaded online.
165165

166166
## RELATED LINKS
167-

src/Azs.Gallery.Admin/docs/Azs.Gallery.Admin.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Locale: en-US
88

99
# Azs.Gallery.Admin Module
1010
## Description
11-
Microsoft Azure PowerShell: Gallery cmdlets
11+
Microsoft AzureStack PowerShell: Gallery cmdlets
1212

1313
## Azs.Gallery.Admin Cmdlets
14+
### [Add-AzsGalleryItem](Add-AzsGalleryItem.md)
15+
Uploads a provider gallery item to the storage.
16+
1417
### [Get-AzsGalleryItem](Get-AzsGalleryItem.md)
1518
Get a specific gallery item.
1619

17-
### [New-AzsGalleryItem](New-AzsGalleryItem.md)
18-
Uploads a provider gallery item to the storage.
19-
2020
### [Remove-AzsGalleryItem](Remove-AzsGalleryItem.md)
2121
Delete a specific gallery item.
2222

Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
### Example 1: New-AzsGalleryItem
1+
### Example 1: Add-AzsGalleryItem
22
```powershell
3-
PS C:\> New-AzsGalleryItem -GalleryItemUri https://testsa.blob.redmond.ext-n35r1010.masd.stbtest.microsoft.com/testsc/TestUbuntu.Test.1.0.0.azpkg
3+
PS C:\> Add-AzsGalleryItem -GalleryItemUri https://testsa.blob.redmond.ext-n35r1010.masd.stbtest.microsoft.com/testsc/TestUbuntu.Test.1.0.0.azpkg
44
55
Name Publisher PublisherDisplayName ItemName ItemDisplayName Version Summary
66
---- --------- -------------------- -------- --------------- ------- -------
77
TestUbuntu.Test.1.0.0 TestUbuntu TestUbuntu Test Test.TestUbuntu.1.0.0 1.0.0 Create a simple VM
88
99
```
1010

11-
Uploads TestUbuntu.Test.1.0.0 to the gallery.
11+
Uploads TestUbuntu.Test.1.0.0 to the gallery.

src/Azs.Gallery.Admin/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ directive:
9292
- Summary
9393
- where:
9494
verb: New
95-
subject: AzsGalleryItem
95+
subject: GalleryItem
9696
set:
9797
verb: Add
98-
subject: AzsGalleryItem
98+
subject: GalleryItem
9999

100100
# Add release notes
101101
- from: Azs.Gallery.Admin.nuspec

src/Azs.Gallery.Admin/test/New-AzsGalleryItem.Recording.json renamed to src/Azs.Gallery.Admin/test/Add-AzsGalleryItem.Recording.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"New-AzsGalleryItem+[NoContext]+TestCreateGalleryItem+$DELETE+https://adminmanagement.redmond.ext-n35r1010.masd.stbtest.microsoft.com/subscriptions/b64bc025-4ace-4ffa-844e-4473ded5c230/providers/Microsoft.Gallery.Admin/galleryItems/TestUbuntu.Test.1.0.0?api-version=2015-04-01+1": {
2+
"Add-AzsGalleryItem+[NoContext]+TestCreateGalleryItem+$DELETE+https://adminmanagement.redmond.ext-n35r1010.masd.stbtest.microsoft.com/subscriptions/b64bc025-4ace-4ffa-844e-4473ded5c230/providers/Microsoft.Gallery.Admin/galleryItems/TestUbuntu.Test.1.0.0?api-version=2015-04-01+1": {
33
"Request": {
44
"Method": "DELETE",
55
"RequestUri": "https://adminmanagement.redmond.ext-n35r1010.masd.stbtest.microsoft.com/subscriptions/b64bc025-4ace-4ffa-844e-4473ded5c230/providers/Microsoft.Gallery.Admin/galleryItems/TestUbuntu.Test.1.0.0?api-version=2015-04-01",
@@ -40,16 +40,16 @@
4040
"Content": null
4141
}
4242
},
43-
"New-AzsGalleryItem+[NoContext]+TestCreateGalleryItem+$POST+https://adminmanagement.redmond.ext-n35r1010.masd.stbtest.microsoft.com/subscriptions/b64bc025-4ace-4ffa-844e-4473ded5c230/providers/Microsoft.Gallery.Admin/galleryItems?api-version=2015-04-01+2": {
43+
"Add-AzsGalleryItem+[NoContext]+TestCreateGalleryItem+$POST+https://adminmanagement.redmond.ext-n35r1010.masd.stbtest.microsoft.com/subscriptions/b64bc025-4ace-4ffa-844e-4473ded5c230/providers/Microsoft.Gallery.Admin/galleryItems?api-version=2015-04-01+2": {
4444
"Request": {
4545
"Method": "POST",
4646
"RequestUri": "https://adminmanagement.redmond.ext-n35r1010.masd.stbtest.microsoft.com/subscriptions/b64bc025-4ace-4ffa-844e-4473ded5c230/providers/Microsoft.Gallery.Admin/galleryItems?api-version=2015-04-01",
4747
"Content": "{\r\n \"galleryItemUri\": \"https://testsa.blob.redmond.ext-n35r1010.masd.stbtest.microsoft.com/testsc/TestUbuntu.Test.1.0.0.azpkg\"\r\n}",
4848
"Headers": {
4949
"x-ms-unique-id": [ "10" ],
5050
"x-ms-client-request-id": [ "c7b11cf9-b6ee-4814-a40b-62a53ee8519d" ],
51-
"CommandName": [ "New-AzsGalleryItem" ],
52-
"FullCommandName": [ "New-AzsGalleryItem_CreateExpanded" ],
51+
"CommandName": [ "Add-AzsGalleryItem" ],
52+
"FullCommandName": [ "Add-AzsGalleryItem_CreateExpanded" ],
5353
"ParameterSetName": [ "__AllParameterSets" ],
5454
"User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ],
5555
"Authorization": [ "[Filtered]" ]
@@ -84,7 +84,7 @@
8484
"Content": "{\"id\":\"/subscriptions/b64bc025-4ace-4ffa-844e-4473ded5c230/providers/Microsoft.Gallery.Admin/galleryItems/TestUbuntu.Test.1.0.0\",\"name\":\"TestUbuntu.Test.1.0.0\",\"type\":\"Microsoft.Gallery.Admin/galleryItems\",\"properties\":{\"identity\":\"TestUbuntu.Test.1.0.0\",\"publisher\":\"TestUbuntu\",\"publisherDisplayName\":\"TestUbuntu\",\"itemName\":\"Test\",\"itemDisplayName\":\"Test.TestUbuntu.1.0.0\",\"version\":\"1.0.0\",\"summary\":\"Create a simple VM\",\"longSummary\":\"Create a simple VM and use it\",\"description\":\"\u003cp\u003eThis is just a sample of the type of description you could create for your gallery item!\u003c/p\u003e\u003cp\u003eThis is a second paragraph.\u003c/p\u003e\",\"uiDefinitionUri\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/UIDefinition.json\",\"createdTime\":\"2020-02-12T07:05:57.6265404Z\",\"changedTime\":\"2020-02-12T07:05:57.6271511Z\",\"itemType\":\"GalleryItem\",\"categoryIds\":[\"Custom\",\"Disconnected\",\"My Marketplace Items\"],\"screenshotUris\":[],\"links\":[{\"id\":\"0\",\"displayName\":\"Documentation\",\"uri\":\"http://go.microsoft.com/fwlink/?LinkId=532898\"}],\"filters\":[],\"iconFileUris\":{\"small\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/icons/Small.png\",\"medium\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/icons/Medium.png\",\"large\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/icons/Large.png\",\"wide\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/icons/Wide.png\"},\"artifacts\":[{\"name\":\"LinuxTemplate\",\"uri\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/DeploymentTemplates/LinuxTemplate.json\",\"type\":\"template\"}],\"metadata\":{},\"properties\":{},\"images\":[{\"context\":\"ibiza\",\"items\":[{\"id\":\"small\",\"uri\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/icons/Small.png\",\"type\":\"icon\"},{\"id\":\"medium\",\"uri\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/icons/Medium.png\",\"type\":\"icon\"},{\"id\":\"large\",\"uri\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/icons/Large.png\",\"type\":\"icon\"},{\"id\":\"wide\",\"uri\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/icons/Wide.png\",\"type\":\"icon\"}]}],\"products\":[],\"searchScore\":0.0,\"definitionTemplates\":{\"uiDefinitionFileUri\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/UIDefinition.json\",\"defaultDeploymentTemplateId\":\"LinuxTemplate\",\"deploymentTemplateFileUris\":{\"LinuxTemplate\":\"https://galleryartifacts.adminhosting.redmond.ext-n35r1010.masd.stbtest.microsoft.com//artifact/20161101/TestUbuntu.Test.1.0.0/DeploymentTemplates/LinuxTemplate.json\"},\"deploymentFragmentFileUris\":{}},\"additionalProperties\":{},\"keywords\":[]}}"
8585
}
8686
},
87-
"New-AzsGalleryItem+[NoContext]+TestCreateGalleryItem+$DELETE+https://adminmanagement.redmond.ext-n35r1010.masd.stbtest.microsoft.com/subscriptions/b64bc025-4ace-4ffa-844e-4473ded5c230/providers/Microsoft.Gallery.Admin/galleryItems/TestUbuntu.Test.1.0.0?api-version=2015-04-01+3": {
87+
"Add-AzsGalleryItem+[NoContext]+TestCreateGalleryItem+$DELETE+https://adminmanagement.redmond.ext-n35r1010.masd.stbtest.microsoft.com/subscriptions/b64bc025-4ace-4ffa-844e-4473ded5c230/providers/Microsoft.Gallery.Admin/galleryItems/TestUbuntu.Test.1.0.0?api-version=2015-04-01+3": {
8888
"Request": {
8989
"Method": "DELETE",
9090
"RequestUri": "https://adminmanagement.redmond.ext-n35r1010.masd.stbtest.microsoft.com/subscriptions/b64bc025-4ace-4ffa-844e-4473ded5c230/providers/Microsoft.Gallery.Admin/galleryItems/TestUbuntu.Test.1.0.0?api-version=2015-04-01",

src/Azs.Gallery.Admin/test/New-AzsGalleryItem.Tests.ps1 renamed to src/Azs.Gallery.Admin/test/Add-AzsGalleryItem.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzsGalleryItem.Recording.json'
1+
$TestRecordingFile = Join-Path $PSScriptRoot 'Add-AzsGalleryItem.Recording.json'
22
$currentPath = $PSScriptRoot
33
while(-not $mockingPath) {
44
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
55
$currentPath = Split-Path -Path $currentPath -Parent
66
}
77
. ($mockingPath | Select-Object -First 1).FullName
88

9-
Describe 'New-AzsGalleryItem' {
9+
Describe 'Add-AzsGalleryItem' {
1010
it "TestCreateGalleryItem" {
1111
$global:TestName = 'TestCreateAndDeleteGalleryItem'
1212

1313
$name = "TestUbuntu.Test.1.0.0"
1414
$uri = "https://testsa.blob.redmond.ext-n35r1010.masd.stbtest.microsoft.com/testsc/TestUbuntu.Test.1.0.0.azpkg"
1515
Remove-AzsGalleryItem -Name $name
1616

17-
$GalleryItem = New-AzsGalleryItem -GalleryItemUri $uri
17+
$GalleryItem = Add-AzsGalleryItem -GalleryItemUri $uri
1818
$GalleryItem | Should Not Be $null
1919

2020
Remove-AzsGalleryItem -Name $GalleryItem.Name

0 commit comments

Comments
 (0)