Skip to content

Commit 4edcd64

Browse files
committed
Merge pull request #98 from MabOneSdk/dev1-pikumar-git2
Dev1 pikumar git2
2 parents 2bc0081 + 92d7785 commit 4edcd64

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletBase.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,13 @@ internal CSMOperationResult TrackOperation(Guid operationId, int checkFrequency
167167
{
168168
response = GetOperationStatus(operationId);
169169

170-
if (response.Status == CSMAzureBackupOperationStatus.Succeeded.ToString())
170+
if (response.Status != CSMAzureBackupOperationStatus.InProgress.ToString())
171171
{
172+
if(response.Status == CSMAzureBackupOperationStatus.Failed.ToString())
173+
{
174+
throw new Exception(string.Format("OperationStatus for operaiton id {0} is failed with error : {1}", operationId, response.Error.ToString()));
175+
}
176+
172177
break;
173178
}
174179

src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Enable-AzureBackupProtection .cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ public override void ExecuteCmdlet()
6262
}
6363
else
6464
{
65-
throw new Exception("Uknown item type");
65+
throw new Exception("Unknown item type");
6666
}
6767
}
6868

6969
else
7070
{
71-
throw new Exception("Uknown item type");
71+
throw new Exception("Unknown item type");
7272
}
7373

7474
var operationId = AzureBackupClient.EnableProtection(Item.ContainerUniqueName, itemName, input);

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,49 @@
119119
</TableRowEntries>
120120
</TableControl>
121121
</View>
122+
<View>
123+
<Name>Microsoft.Azure.Commands.AzureBackup.Models.AzureBackupItem</Name>
124+
<ViewSelectedBy>
125+
<TypeName>Microsoft.Azure.Commands.AzureBackup.Models.AzureBackupItem</TypeName>
126+
</ViewSelectedBy>
127+
<TableControl>
128+
<TableHeaders>
129+
<TableColumnHeader>
130+
<Label>ItemName</Label>
131+
<Width>18</Width>
132+
</TableColumnHeader>
133+
<TableColumnHeader>
134+
<Label>ProtectionStatus</Label>
135+
<Width>18</Width>
136+
</TableColumnHeader>
137+
<TableColumnHeader>
138+
<Label>RecoveryPointsCount</Label>
139+
<Width>22</Width>
140+
</TableColumnHeader>
141+
<TableColumnHeader>
142+
<Label>ProtectionPolicyName</Label>
143+
<Width>36</Width>
144+
</TableColumnHeader>
145+
</TableHeaders>
146+
<TableRowEntries>
147+
<TableRowEntry>
148+
<TableColumnItems>
149+
<TableColumnItem>
150+
<PropertyName>ItemName</PropertyName>
151+
</TableColumnItem>
152+
<TableColumnItem>
153+
<PropertyName>ProtectionStatus</PropertyName>
154+
</TableColumnItem>
155+
<TableColumnItem>
156+
<PropertyName>RecoveryPointsCount</PropertyName>
157+
</TableColumnItem>
158+
<TableColumnItem>
159+
<PropertyName>ProtectionPolicyName</PropertyName>
160+
</TableColumnItem>
161+
</TableColumnItems>
162+
</TableRowEntry>
163+
</TableRowEntries>
164+
</TableControl>
165+
</View>
122166
</ViewDefinitions>
123167
</Configuration>

0 commit comments

Comments
 (0)