Skip to content

Commit ad7df08

Browse files
authored
Merge pull request Azure#8 from LingyunSu/dev
Fabric.Admin module changes - Phase 2
2 parents 3fa8c50 + fb11ea0 commit ad7df08

13 files changed

+2453
-5
lines changed

src/Azs.Fabric.Admin/readme.md

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ directive:
9191
default:
9292
script: -join("System.",(Get-AzLocation)[0].Location)
9393

94-
# [EdgeGateway]: Folloing changes are for EdgeGateway
94+
# [EdgeGateway]: Following changes are for EdgeGateway
9595
# [EdgeGateway] Propertity Rename: change NumberOfConnection to NumberOfConnections
9696
- where:
9797
model-name: EdgeGateway
@@ -112,7 +112,28 @@ directive:
112112
subject: EdgeGateway
113113
hide: true
114114

115-
# [EdgeGatewayPool]: Folloing changes are for EdgeGatewayPool
115+
# [LogicalNetwork]: Following changes are for LogicalNetwork
116+
# [LogicalNetwork] Rename property name in LogicalNetwork
117+
- where:
118+
model-name: LogicalNetwork
119+
property-name: Subnet
120+
set:
121+
property-name: Subnets
122+
123+
# [LogicalNetwork] Rename cmdlet parameter name in LogicalNetwork
124+
- where:
125+
subject: LogicalNetwork
126+
parameter-name: LogicalNetwork
127+
set:
128+
parameter-name: Name
129+
130+
# [LogicalNetwork] hide autorest generated cmdlet to use the custom one
131+
- where:
132+
verb: Get
133+
subject: LogicalNetwork
134+
hide: true
135+
136+
# [EdgeGatewayPool]: Following changes are for EdgeGatewayPool
116137
# [EdgeGateway] Rename cmdlet parameter name in EdgeGatewayPool
117138
- where:
118139
subject: EdgeGatewayPool
@@ -133,7 +154,7 @@ directive:
133154
subject: EdgeGatewayPool
134155
hide: true
135156

136-
# [InfrastructureRole]: Folloing changes are for InfrastructureRole
157+
# [InfrastructureRole]: Following changes are for InfrastructureRole
137158
# Rename subject AzsInfraRole to AzsInfrastructureRole
138159
- where:
139160
subject: InfraRole
@@ -193,8 +214,42 @@ directive:
193214
subject: IPPool
194215
hide: true
195216

196-
# [ScaleUnitNode]: Following changes are for ScaleUnit
197-
# Rename Invoke-ScaleUnitOut to Add-AzsScaleUnitNode
217+
# [ScaleUnit]: Following changes are for ScaleUnit
218+
# [ScaleUnit] Cmdlet parameter rename
219+
- where:
220+
subject: ScaleUnit
221+
parameter-name: ScaleUnit
222+
set:
223+
parameter-name: Name
224+
225+
# [ScaleUnit] Hide auto-generated
226+
- where:
227+
verb: Get
228+
subject: ScaleUnit
229+
hide: true
230+
231+
# [ScaleUnitNode]: Following changes are for ScaleUnitNode
232+
# [ScaleUnitNode] Cmdlet parameter rename
233+
- where:
234+
subject: ScaleUnitNode
235+
parameter-name: ScaleUnitNode
236+
set:
237+
parameter-name: Name
238+
239+
# [ScaleUnitNode] Hide auto-generated
240+
- where:
241+
verb: Get
242+
subject: ScaleUnitNode
243+
hide: true
244+
245+
# [ScaleUnitNode]: Rename property name
246+
- where:
247+
model-name: ScaleUnitNode
248+
property-name: Status
249+
set:
250+
property-name: ScaleUnitNodeStatus
251+
252+
# [ScaleUnitNode] Rename Invoke-ScaleUnitOut to Add-AzsScaleUnitNode
198253
- where:
199254
verb: Invoke
200255
subject: ScaleUnitOut
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
2+
if (-Not (Test-Path -Path $loadEnvPath)) {
3+
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
4+
}
5+
. ($loadEnvPath)
6+
$TestRecordingFile = Join-Path $PSScriptRoot 'Add-AzsScaleUnitNode.Recording.json'
7+
$currentPath = $PSScriptRoot
8+
while(-not $mockingPath) {
9+
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
10+
$currentPath = Split-Path -Path $currentPath -Parent
11+
}
12+
. ($mockingPath | Select-Object -First 1).FullName
13+
14+
Describe 'Add-AzsScaleUnitNode' {
15+
It 'ScaleExpanded' -skip {
16+
{ throw [System.NotImplementedException] } | Should -Not -Throw
17+
}
18+
19+
It 'Scale' -skip {
20+
{ throw [System.NotImplementedException] } | Should -Not -Throw
21+
}
22+
23+
It 'ScaleViaIdentityExpanded' -skip {
24+
{ throw [System.NotImplementedException] } | Should -Not -Throw
25+
}
26+
27+
It 'ScaleViaIdentity' -skip {
28+
{ throw [System.NotImplementedException] } | Should -Not -Throw
29+
}
30+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
2+
if (-Not (Test-Path -Path $loadEnvPath)) {
3+
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
4+
}
5+
. ($loadEnvPath)
6+
$TestRecordingFile = Join-Path $PSScriptRoot 'Disable-AzsInfrastructureRoleInstance.Recording.json'
7+
$currentPath = $PSScriptRoot
8+
while(-not $mockingPath) {
9+
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
10+
$currentPath = Split-Path -Path $currentPath -Parent
11+
}
12+
. ($mockingPath | Select-Object -First 1).FullName
13+
14+
Describe 'Disable-AzsInfrastructureRoleInstance' {
15+
It 'Shutdown' -skip {
16+
{ throw [System.NotImplementedException] } | Should -Not -Throw
17+
}
18+
19+
It 'ShutdownViaIdentity' -skip {
20+
{ throw [System.NotImplementedException] } | Should -Not -Throw
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
2+
if (-Not (Test-Path -Path $loadEnvPath)) {
3+
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
4+
}
5+
. ($loadEnvPath)
6+
$TestRecordingFile = Join-Path $PSScriptRoot 'Disable-AzsScaleUnitNode.Recording.json'
7+
$currentPath = $PSScriptRoot
8+
while(-not $mockingPath) {
9+
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
10+
$currentPath = Split-Path -Path $currentPath -Parent
11+
}
12+
. ($mockingPath | Select-Object -First 1).FullName
13+
14+
Describe 'Disable-AzsScaleUnitNode' {
15+
It 'Start' -skip {
16+
{ throw [System.NotImplementedException] } | Should -Not -Throw
17+
}
18+
19+
It 'StartViaIdentity' -skip {
20+
{ throw [System.NotImplementedException] } | Should -Not -Throw
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1'
2+
if (-Not (Test-Path -Path $loadEnvPath)) {
3+
$loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1'
4+
}
5+
. ($loadEnvPath)
6+
$TestRecordingFile = Join-Path $PSScriptRoot 'Enable-AzsScaleUnitNode.Recording.json'
7+
$currentPath = $PSScriptRoot
8+
while(-not $mockingPath) {
9+
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
10+
$currentPath = Split-Path -Path $currentPath -Parent
11+
}
12+
. ($mockingPath | Select-Object -First 1).FullName
13+
14+
Describe 'Enable-AzsScaleUnitNode' {
15+
It 'Stop' -skip {
16+
{ throw [System.NotImplementedException] } | Should -Not -Throw
17+
}
18+
19+
It 'StopViaIdentity' -skip {
20+
{ throw [System.NotImplementedException] } | Should -Not -Throw
21+
}
22+
}

0 commit comments

Comments
 (0)