File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 12
12
// limitations under the License.
13
13
// ----------------------------------------------------------------------------------
14
14
15
+ using AutoMapper ;
15
16
using Microsoft . Azure . Commands . Compute . Common ;
16
17
using Microsoft . Azure . Commands . Compute . Models ;
17
- using Microsoft . Azure . Commands . Tags . Model ;
18
18
using Microsoft . Azure . Management . Compute ;
19
19
using Microsoft . Azure . Management . Compute . Models ;
20
20
using System . Collections ;
23
23
namespace Microsoft . Azure . Commands . Compute
24
24
{
25
25
[ Cmdlet ( VerbsCommon . New , ProfileNouns . VirtualMachine ) ]
26
+ [ OutputType ( typeof ( PSComputeLongRunningOperation ) ) ]
26
27
public class NewAzureVMCommand : VirtualMachineBaseCmdlet
27
28
{
28
29
[ Parameter ( Mandatory = true , ValueFromPipelineByPropertyName = true ) ]
@@ -61,7 +62,8 @@ protected override void ProcessRecord()
61
62
} ;
62
63
63
64
var op = this . VirtualMachineClient . CreateOrUpdate ( this . ResourceGroupName , parameters ) ;
64
- WriteObject ( op ) ;
65
+ var result = Mapper . Map < PSComputeLongRunningOperation > ( op ) ;
66
+ WriteObject ( result ) ;
65
67
} ) ;
66
68
}
67
69
}
Original file line number Diff line number Diff line change 12
12
// limitations under the License.
13
13
// ----------------------------------------------------------------------------------
14
14
15
-
15
+ using AutoMapper ;
16
16
using Microsoft . Azure . Commands . Compute . Common ;
17
17
using Microsoft . Azure . Commands . Compute . Models ;
18
18
using Microsoft . Azure . Management . Compute ;
22
22
23
23
namespace Microsoft . Azure . Commands . Compute
24
24
{
25
- [ Cmdlet ( VerbsData . Update , ProfileNouns . VirtualMachine , DefaultParameterSetName = ResourceGroupNameParameterSet ) ]
25
+ [ Cmdlet ( VerbsData . Update , ProfileNouns . VirtualMachine , DefaultParameterSetName = ResourceGroupNameParameterSet ) ]
26
+ [ OutputType ( typeof ( PSComputeLongRunningOperation ) ) ]
26
27
public class UpdateAzureVMCommand : VirtualMachineActionBaseCmdlet
27
28
{
28
29
[ Alias ( "VMProfile" ) ]
@@ -53,7 +54,8 @@ protected override void ProcessRecord()
53
54
} ;
54
55
55
56
var op = this . VirtualMachineClient . CreateOrUpdate ( this . ResourceGroupName , parameters ) ;
56
- WriteObject ( op ) ;
57
+ var result = Mapper . Map < PSComputeLongRunningOperation > ( op ) ;
58
+ WriteObject ( result ) ;
57
59
} ) ;
58
60
}
59
61
}
You can’t perform that action at this time.
0 commit comments