File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed
src/ResourceManager/Compute/Commands.Compute Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 163
163
<Compile Include =" Extension\RemoveAzureVMExtensionCommand.cs" />
164
164
<Compile Include =" Extension\GetAzureVMExtensionCommand.cs" />
165
165
<Compile Include =" Images\GetAzureVMImageCommand.cs" />
166
+ <Compile Include =" Models\HashTableExtensions.cs" />
166
167
<Compile Include =" Models\PSStorageAccount.cs" />
167
168
<Compile Include =" Extension\VMAccess\GetAzureVMAccessExtension.cs" />
168
169
<Compile Include =" Extension\VMAccess\RemoveAzureVMAccessExtension.cs" />
Original file line number Diff line number Diff line change
1
+ // ----------------------------------------------------------------------------------
2
+ //
3
+ // Copyright Microsoft Corporation
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ // ----------------------------------------------------------------------------------
14
+
15
+ using Microsoft . Azure . Commands . Tags . Model ;
16
+ using System . Collections ;
17
+ using System . Collections . Generic ;
18
+
19
+ namespace Microsoft . Azure . Commands . Compute . Models
20
+ {
21
+ public static class HashTableExtension
22
+ {
23
+ public static Dictionary < string , string > ToDictionary ( this Hashtable [ ] tags )
24
+ {
25
+ return TagsConversionHelper . CreateTagDictionary ( tags , true ) ;
26
+ }
27
+ }
28
+ }
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public override void ExecuteCmdlet()
60
60
AvailabilitySetReference = this . VM . AvailabilitySetReference ,
61
61
Location = ! string . IsNullOrEmpty ( this . Location ) ? this . Location : this . VM . Location ,
62
62
Name = ! string . IsNullOrEmpty ( this . Name ) ? this . Name : this . VM . Name ,
63
- Tags = this . Tags != null ? TagsConversionHelper . CreateTagDictionary ( this . Tags , true ) : this . VM . Tags
63
+ Tags = this . Tags != null ? this . Tags . ToDictionary ( ) : this . VM . Tags
64
64
} ;
65
65
66
66
var op = this . VirtualMachineClient . CreateOrUpdate ( this . ResourceGroupName , parameters ) ;
You can’t perform that action at this time.
0 commit comments