Skip to content

Commit a5374c1

Browse files
committed
Merge pull request #1646 from huangpf/clu
AzureRT PR - CLU Format & Types Fix
2 parents ba03791 + ced0209 commit a5374c1

File tree

10 files changed

+13
-198
lines changed

10 files changed

+13
-198
lines changed

src/CLU/Microsoft.Azure.Commands.Compute/AvailabilitySets/RemoveAzureAvailabilitySetCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace Microsoft.Azure.Commands.Compute
2121
{
2222
[Cmdlet(VerbsCommon.Remove, ProfileNouns.AvailabilitySet)]
23-
[OutputType(typeof(PSOperation))]
23+
[OutputType(typeof(void))]
2424
[CliCommandAlias("vm;availabilityset;rm")]
2525
public class RemoveAzureAvailabilitySetCommand : AvailabilitySetBaseCmdlet
2626
{

src/CLU/Microsoft.Azure.Commands.Compute/Extension/CustomScript/RemoveAzureVMCustomScriptExtensionCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace Microsoft.Azure.Commands.Compute
2222
VerbsCommon.Remove,
2323
ProfileNouns.VirtualMachineCustomScriptExtension)]
2424
[CliCommandAlias("vm;customscriptextension;rm")]
25+
[OutputType(typeof(void))]
2526
public class RemoveAzureVMCustomScriptExtensionCommand : VirtualMachineExtensionBaseCmdlet
2627
{
2728
[Parameter(

src/CLU/Microsoft.Azure.Commands.Compute/Extension/CustomScript/SetAzureVMCustomScriptExtensionCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace Microsoft.Azure.Commands.Compute
3535
ProfileNouns.VirtualMachineCustomScriptExtension,
3636
DefaultParameterSetName = SetCustomScriptExtensionByContainerBlobsParamSetName)]
3737
[CliCommandAlias("vm;customscriptextension;set")]
38+
[OutputType(typeof(void))]
3839
public class SetAzureVMCustomScriptExtensionCommand : VirtualMachineExtensionBaseCmdlet
3940
{
4041
protected const string SetCustomScriptExtensionByContainerBlobsParamSetName = "SetCustomScriptExtensionByContainerAndFileNames";

src/CLU/Microsoft.Azure.Commands.Compute/Extension/VMAccess/RemoveAzureVMAccessExtension.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace Microsoft.Azure.Commands.Compute
2222
VerbsCommon.Remove,
2323
ProfileNouns.VirtualMachineAccessExtension)]
2424
[CliCommandAlias("vm;accessextension;rm")]
25+
[OutputType(typeof(void))]
2526
public class RemoveAzureVMAccessExtensionCommand : VirtualMachineExtensionBaseCmdlet
2627
{
2728
[Parameter(

src/CLU/Microsoft.Azure.Commands.Compute/Extension/VMAccess/SetAzureVMAccessExtension.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ namespace Microsoft.Azure.Commands.Compute
2626
VerbsCommon.Set,
2727
ProfileNouns.VirtualMachineAccessExtension)]
2828
[CliCommandAlias("vm;accessextension;set")]
29+
[OutputType(typeof(void))]
2930
public class SetAzureVMAccessExtensionCommand : VirtualMachineExtensionBaseCmdlet
3031
{
3132
private const string userNameKey = "UserName";

src/CLU/Microsoft.Azure.Commands.Compute/VirtualMachine/Action/SetAzureVMCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ namespace Microsoft.Azure.Commands.Compute
2020
{
2121
[Cmdlet(VerbsCommon.Set, ProfileNouns.VirtualMachine, DefaultParameterSetName = ResourceGroupNameParameterSet)]
2222
[CliCommandAlias("vm;set")]
23+
[OutputType(typeof(void))]
2324
public class SetAzureVMCommand : VirtualMachineActionBaseCmdlet
2425
{
2526
[Parameter(

src/CLU/Microsoft.Azure.Commands.Compute/VirtualMachine/Action/StartAzureVMCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
namespace Microsoft.Azure.Commands.Compute
2222
{
2323
[Cmdlet(VerbsLifecycle.Start, ProfileNouns.VirtualMachine, DefaultParameterSetName = ResourceGroupNameParameterSet)]
24-
[OutputType(typeof(PSComputeLongRunningOperation))]
24+
[OutputType(typeof(void))]
2525
[CliCommandAlias("vm;start")]
2626
public class StartAzureVMCommand : VirtualMachineActionBaseCmdlet
2727
{

src/CLU/Microsoft.Azure.Commands.Compute/VirtualMachine/Action/StopAzureVMCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
namespace Microsoft.Azure.Commands.Compute
2424
{
2525
[Cmdlet(VerbsLifecycle.Stop, ProfileNouns.VirtualMachine, DefaultParameterSetName = ResourceGroupNameParameterSet)]
26-
[OutputType(typeof(PSComputeLongRunningOperation))]
26+
[OutputType(typeof(void))]
2727
[CliCommandAlias("vm;stop")]
2828
public class StopAzureVMCommand : VirtualMachineActionBaseCmdlet
2929
{

src/CLU/Sync/Upload/BlobSynchronizer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ public bool Synchronize()
6161
{
6262
b.Properties.ContentMD5 = md5HashOfDataChunk;
6363
// TODO: CLU
64-
b.WritePagesAsync(stream, dwr.Range.StartIndex, md5HashOfDataChunk).Wait();
64+
Program.SyncOutput.WriteVerboseWithTimestamp(
65+
string.Format("Range Start Index = {0}, ContentMD5 = {1}", dwr.Range.StartIndex, md5HashOfDataChunk));
66+
b.WritePagesAsync(stream, dwr.Range.StartIndex, null).Wait();
6567
//b.WritePages(stream, dwr.Range.StartIndex);
6668
}
6769
}

src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.format.ps1xml

Lines changed: 2 additions & 194 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</ListEntries>
102102
</ListControl>
103103
</View>
104-
<!--<View>
104+
<View>
105105
<Name>Microsoft.Azure.Commands.Compute.Models.PSOperation</Name>
106106
<ViewSelectedBy>
107107
<TypeName>Microsoft.Azure.Commands.Compute.Models.PSOperation</TypeName>
@@ -122,7 +122,7 @@
122122
</ListEntry>
123123
</ListEntries>
124124
</ListControl>
125-
</View>-->
125+
</View>
126126
<View>
127127
<Name>Microsoft.Azure.Commands.Compute.Models.PSVirtualMachineImageBase</Name>
128128
<ViewSelectedBy>
@@ -444,198 +444,6 @@
444444
</ListEntries>
445445
</ListControl>
446446
</View>
447-
<View>
448-
<Name>Microsoft.Azure.Management.Compute.Models.DataDisk</Name>
449-
<ViewSelectedBy>
450-
<TypeName>Microsoft.Azure.Management.Compute.Models.DataDisk</TypeName>
451-
</ViewSelectedBy>
452-
<ListControl>
453-
<ListEntries>
454-
<ListEntry>
455-
<ListItems>
456-
<ListItem>
457-
<Label>Name</Label>
458-
<PropertyName>Name</PropertyName>
459-
</ListItem>
460-
<ListItem>
461-
<Label>DiskSizeGB</Label>
462-
<PropertyName>DiskSizeGB</PropertyName>
463-
</ListItem>
464-
<ListItem>
465-
<Label>Lun</Label>
466-
<PropertyName>Lun</PropertyName>
467-
</ListItem>
468-
<ListItem>
469-
<Label>Caching</Label>
470-
<PropertyName>Caching</PropertyName>
471-
</ListItem>
472-
<ListItem>
473-
<Label>CreateOption</Label>
474-
<PropertyName>CreateOption</PropertyName>
475-
</ListItem>
476-
<ListItem>
477-
<Label>SourceImage</Label>
478-
<PropertyName>SourceImage</PropertyName>
479-
</ListItem>
480-
<ListItem>
481-
<Label>VirtualHardDisk</Label>
482-
<ScriptBlock>
483-
if ($_.VirtualHardDisk -ne $null)
484-
{
485-
$_.VirtualHardDisk.Uri;
486-
}
487-
else
488-
{
489-
$_.VirtualHardDisk;
490-
}
491-
</ScriptBlock>
492-
</ListItem>
493-
</ListItems>
494-
</ListEntry>
495-
</ListEntries>
496-
</ListControl>
497-
</View>
498-
499-
<View>
500-
<Name>Microsoft.Azure.Commands.Compute.Extension.DSC.VirtualMachineDscExtensionContext</Name>
501-
<ViewSelectedBy>
502-
<TypeName>Microsoft.Azure.Commands.Compute.Extension.DSC.VirtualMachineDscExtensionContext</TypeName>
503-
</ViewSelectedBy>
504-
<ListControl>
505-
<ListEntries>
506-
<ListEntry>
507-
<ListItems>
508-
<ListItem>
509-
<Label>ResourceGroupName</Label>
510-
<PropertyName>ResourceGroupName</PropertyName>
511-
</ListItem>
512-
<ListItem>
513-
<Label>Name</Label>
514-
<PropertyName>Name</PropertyName>
515-
</ListItem>
516-
<ListItem>
517-
<Label>Publisher</Label>
518-
<PropertyName>Publisher</PropertyName>
519-
</ListItem>
520-
<ListItem>
521-
<Label>ExtensionType</Label>
522-
<PropertyName>ExtensionType</PropertyName>
523-
</ListItem>
524-
<ListItem>
525-
<Label>TypeHandlerVersion</Label>
526-
<PropertyName>TypeHandlerVersion</PropertyName>
527-
</ListItem>
528-
<ListItem>
529-
<Label>ProvisioningState</Label>
530-
<PropertyName>ProvisioningState</PropertyName>
531-
</ListItem>
532-
<ListItem>
533-
<Label>Location</Label>
534-
<PropertyName>Location</PropertyName>
535-
</ListItem>
536-
<ListItem>
537-
<Label>Id</Label>
538-
<PropertyName>Id</PropertyName>
539-
</ListItem>
540-
<ListItem>
541-
<Label>ModulesUrl</Label>
542-
<PropertyName>ModulesUrl</PropertyName>
543-
</ListItem>
544-
<ListItem>
545-
<Label>ConfigurationFunction</Label>
546-
<PropertyName>ConfigurationFunction</PropertyName>
547-
</ListItem>
548-
<ListItem>
549-
<Label>Properties</Label>
550-
<PropertyName>Properties</PropertyName>
551-
</ListItem>
552-
<ListItem>
553-
<Label>Statuses</Label>
554-
<PropertyName>StatusesText</PropertyName>
555-
</ListItem>
556-
</ListItems>
557-
</ListEntry>
558-
</ListEntries>
559-
</ListControl>
560-
</View>
561-
562-
<View>
563-
<Name>Microsoft.Azure.Commands.Compute.Extension.DSC.VirtualMachineDscExtensionStatusContext</Name>
564-
<OutOfBand />
565-
<ViewSelectedBy>
566-
<TypeName>Microsoft.Azure.Commands.Compute.Extension.DSC.VirtualMachineDscExtensionStatusContext</TypeName>
567-
</ViewSelectedBy>
568-
<ListControl>
569-
<ListEntries>
570-
<ListEntry>
571-
<ListItems>
572-
<ListItem>
573-
<Label>ResourceGroupName</Label>
574-
<PropertyName>ResourceGroupName</PropertyName>
575-
</ListItem>
576-
<ListItem>
577-
<Label>VmName</Label>
578-
<PropertyName>VmName</PropertyName>
579-
</ListItem>
580-
<ListItem>
581-
<Label>Version</Label>
582-
<PropertyName>Version</PropertyName>
583-
</ListItem>
584-
<ListItem>
585-
<Label>Status</Label>
586-
<PropertyName>Status</PropertyName>
587-
</ListItem>
588-
<ListItem>
589-
<Label>StatusCode</Label>
590-
<PropertyName>StatusCode</PropertyName>
591-
</ListItem>
592-
<ListItem>
593-
<Label>Timestamp</Label>
594-
<ScriptBlock>
595-
$_.Timestamp.ToString("G")
596-
</ScriptBlock>
597-
</ListItem>
598-
<ListItem>
599-
<Label>StatusMessage</Label>
600-
<PropertyName>StatusMessage</PropertyName>
601-
</ListItem>
602-
<ListItem>
603-
<Label>DscConfigurationLog</Label>
604-
<PropertyName>DscConfigurationLog</PropertyName>
605-
</ListItem>
606-
</ListItems>
607-
</ListEntry>
608-
</ListEntries>
609-
</ListControl>
610-
</View>
611-
612-
<View>
613-
<Name>Microsoft.Azure.Commands.Compute.Models.AzureDiskEncryptionStatusContext</Name>
614-
<OutOfBand />
615-
<ViewSelectedBy>
616-
<TypeName>Microsoft.Azure.Commands.Compute.Models.AzureDiskEncryptionStatusContext</TypeName>
617-
</ViewSelectedBy>
618-
<ListControl>
619-
<ListEntries>
620-
<ListEntry>
621-
<ListItems>
622-
<ListItem>
623-
<Label>OsVolumeEncrypted</Label>
624-
<PropertyName>OsVolumeEncrypted</PropertyName>
625-
</ListItem>
626-
<ListItem>
627-
<Label>OsVolumeEncryptionSettings</Label>
628-
<PropertyName>OsVolumeEncryptionSettingsText</PropertyName>
629-
</ListItem>
630-
<ListItem>
631-
<Label>DataVolumesEncrypted</Label>
632-
<PropertyName>DataVolumesEncrypted</PropertyName>
633-
</ListItem>
634-
</ListItems>
635-
</ListEntry>
636-
</ListEntries>
637-
</ListControl>
638-
</View>
639447

640448
</ViewDefinitions>
641449
</Configuration>

0 commit comments

Comments
 (0)