Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Generated from c0def97e9fc1e839db7727fd31c2f583f6cf04d6 (#2811)
Browse files Browse the repository at this point in the history
updated OS Upgrade History API

(cherry picked from commit e784ecac207c88dda10fa0986609907486994913)
  • Loading branch information
AutorestCI authored Apr 27, 2018
1 parent 11ec702 commit 710d70d
Show file tree
Hide file tree
Showing 5 changed files with 254 additions and 43 deletions.
153 changes: 112 additions & 41 deletions lib/services/computeManagement2/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4256,47 +4256,6 @@ export interface VirtualMachineScaleSetSku {
readonly capacity?: VirtualMachineScaleSetSkuCapacity;
}

/**
* @class
* Initializes a new instance of the UpgradeOperationHistoryStatus class.
* @constructor
* Information about the current running state of the overall upgrade.
*
* @member {string} [code] Code indicating the current status of the upgrade.
* Possible values include: 'RollingForward', 'Cancelled', 'Completed',
* 'Faulted'
* @member {date} [startTime] Start time of the upgrade.
* @member {date} [endTime] End time of the upgrade.
*/
export interface UpgradeOperationHistoryStatus {
readonly code?: string;
readonly startTime?: Date;
readonly endTime?: Date;
}

/**
* @class
* Initializes a new instance of the RollingUpgradeProgressInfo class.
* @constructor
* Information about the number of virtual machine instances in each upgrade
* state.
*
* @member {number} [successfulInstanceCount] The number of instances that have
* been successfully upgraded.
* @member {number} [failedInstanceCount] The number of instances that have
* failed to be upgraded successfully.
* @member {number} [inProgressInstanceCount] The number of instances that are
* currently being upgraded.
* @member {number} [pendingInstanceCount] The number of instances that have
* not yet begun to be upgraded.
*/
export interface RollingUpgradeProgressInfo {
readonly successfulInstanceCount?: number;
readonly failedInstanceCount?: number;
readonly inProgressInstanceCount?: number;
readonly pendingInstanceCount?: number;
}

/**
* @class
* Initializes a new instance of the ApiErrorBase class.
Expand Down Expand Up @@ -4350,6 +4309,75 @@ export interface ApiError {
message?: string;
}

/**
* @class
* Initializes a new instance of the RollbackStatusInfo class.
* @constructor
* Information about rollback on failed VM instances after a OS Upgrade
* operation
*
* @member {number} [successfullyRolledbackInstanceCount] The number of
* instances which have been successfully rolled back.
* @member {number} [failedRolledbackInstanceCount] The number of instances
* which failed to rollback.
* @member {object} [rollbackError] Error Details if OS rollback failed.
* @member {array} [rollbackError.details] The Api error details
* @member {object} [rollbackError.innererror] The Api inner error
* @member {string} [rollbackError.innererror.exceptiontype] The exception
* type.
* @member {string} [rollbackError.innererror.errordetail] The internal error
* message or exception dump.
* @member {string} [rollbackError.code] The error code.
* @member {string} [rollbackError.target] The target of the particular error.
* @member {string} [rollbackError.message] The error message.
*/
export interface RollbackStatusInfo {
readonly successfullyRolledbackInstanceCount?: number;
readonly failedRolledbackInstanceCount?: number;
readonly rollbackError?: ApiError;
}

/**
* @class
* Initializes a new instance of the UpgradeOperationHistoryStatus class.
* @constructor
* Information about the current running state of the overall upgrade.
*
* @member {string} [code] Code indicating the current status of the upgrade.
* Possible values include: 'RollingForward', 'Cancelled', 'Completed',
* 'Faulted'
* @member {date} [startTime] Start time of the upgrade.
* @member {date} [endTime] End time of the upgrade.
*/
export interface UpgradeOperationHistoryStatus {
readonly code?: string;
readonly startTime?: Date;
readonly endTime?: Date;
}

/**
* @class
* Initializes a new instance of the RollingUpgradeProgressInfo class.
* @constructor
* Information about the number of virtual machine instances in each upgrade
* state.
*
* @member {number} [successfulInstanceCount] The number of instances that have
* been successfully upgraded.
* @member {number} [failedInstanceCount] The number of instances that have
* failed to be upgraded successfully.
* @member {number} [inProgressInstanceCount] The number of instances that are
* currently being upgraded.
* @member {number} [pendingInstanceCount] The number of instances that have
* not yet begun to be upgraded.
*/
export interface RollingUpgradeProgressInfo {
readonly successfulInstanceCount?: number;
readonly failedInstanceCount?: number;
readonly inProgressInstanceCount?: number;
readonly pendingInstanceCount?: number;
}

/**
* @class
* Initializes a new instance of the UpgradeOperationHistoricalStatusInfoProperties class.
Expand Down Expand Up @@ -4395,13 +4423,31 @@ export interface ApiError {
* available at deploy time. Even if you use 'latest', the VM image will not
* automatically update after deploy time even if a new version becomes
* available.
* @member {object} [rollbackInfo] Information about OS rollback if performed
* @member {number} [rollbackInfo.successfullyRolledbackInstanceCount] The
* number of instances which have been successfully rolled back.
* @member {number} [rollbackInfo.failedRolledbackInstanceCount] The number of
* instances which failed to rollback.
* @member {object} [rollbackInfo.rollbackError] Error Details if OS rollback
* failed.
* @member {array} [rollbackInfo.rollbackError.details] The Api error details
* @member {object} [rollbackInfo.rollbackError.innererror] The Api inner error
* @member {string} [rollbackInfo.rollbackError.innererror.exceptiontype] The
* exception type.
* @member {string} [rollbackInfo.rollbackError.innererror.errordetail] The
* internal error message or exception dump.
* @member {string} [rollbackInfo.rollbackError.code] The error code.
* @member {string} [rollbackInfo.rollbackError.target] The target of the
* particular error.
* @member {string} [rollbackInfo.rollbackError.message] The error message.
*/
export interface UpgradeOperationHistoricalStatusInfoProperties {
readonly runningStatus?: UpgradeOperationHistoryStatus;
readonly progress?: RollingUpgradeProgressInfo;
readonly error?: ApiError;
readonly startedBy?: string;
readonly targetImageReference?: ImageReference;
readonly rollbackInfo?: RollbackStatusInfo;
}

/**
Expand Down Expand Up @@ -4457,6 +4503,31 @@ export interface UpgradeOperationHistoricalStatusInfoProperties {
* latest version of an image available at deploy time. Even if you use
* 'latest', the VM image will not automatically update after deploy time even
* if a new version becomes available.
* @member {object} [properties.rollbackInfo] Information about OS rollback if
* performed
* @member {number}
* [properties.rollbackInfo.successfullyRolledbackInstanceCount] The number of
* instances which have been successfully rolled back.
* @member {number} [properties.rollbackInfo.failedRolledbackInstanceCount] The
* number of instances which failed to rollback.
* @member {object} [properties.rollbackInfo.rollbackError] Error Details if OS
* rollback failed.
* @member {array} [properties.rollbackInfo.rollbackError.details] The Api
* error details
* @member {object} [properties.rollbackInfo.rollbackError.innererror] The Api
* inner error
* @member {string}
* [properties.rollbackInfo.rollbackError.innererror.exceptiontype] The
* exception type.
* @member {string}
* [properties.rollbackInfo.rollbackError.innererror.errordetail] The internal
* error message or exception dump.
* @member {string} [properties.rollbackInfo.rollbackError.code] The error
* code.
* @member {string} [properties.rollbackInfo.rollbackError.target] The target
* of the particular error.
* @member {string} [properties.rollbackInfo.rollbackError.message] The error
* message.
* @member {string} [type] Resource type
* @member {string} [location] Resource location
*/
Expand Down
5 changes: 3 additions & 2 deletions lib/services/computeManagement2/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,12 @@ exports.VirtualMachineScaleSetVMExtensionsSummary = require('./virtualMachineSca
exports.VirtualMachineScaleSetInstanceView = require('./virtualMachineScaleSetInstanceView');
exports.VirtualMachineScaleSetSkuCapacity = require('./virtualMachineScaleSetSkuCapacity');
exports.VirtualMachineScaleSetSku = require('./virtualMachineScaleSetSku');
exports.UpgradeOperationHistoryStatus = require('./upgradeOperationHistoryStatus');
exports.RollingUpgradeProgressInfo = require('./rollingUpgradeProgressInfo');
exports.ApiErrorBase = require('./apiErrorBase');
exports.InnerError = require('./innerError');
exports.ApiError = require('./apiError');
exports.RollbackStatusInfo = require('./rollbackStatusInfo');
exports.UpgradeOperationHistoryStatus = require('./upgradeOperationHistoryStatus');
exports.RollingUpgradeProgressInfo = require('./rollingUpgradeProgressInfo');
exports.UpgradeOperationHistoricalStatusInfoProperties = require('./upgradeOperationHistoricalStatusInfoProperties');
exports.UpgradeOperationHistoricalStatusInfo = require('./upgradeOperationHistoricalStatusInfo');
exports.VirtualMachineScaleSetVM = require('./virtualMachineScaleSetVM');
Expand Down
87 changes: 87 additions & 0 deletions lib/services/computeManagement2/lib/models/rollbackStatusInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

const models = require('./index');

/**
* Information about rollback on failed VM instances after a OS Upgrade
* operation
*
*/
class RollbackStatusInfo {
/**
* Create a RollbackStatusInfo.
* @member {number} [successfullyRolledbackInstanceCount] The number of
* instances which have been successfully rolled back.
* @member {number} [failedRolledbackInstanceCount] The number of instances
* which failed to rollback.
* @member {object} [rollbackError] Error Details if OS rollback failed.
* @member {array} [rollbackError.details] The Api error details
* @member {object} [rollbackError.innererror] The Api inner error
* @member {string} [rollbackError.innererror.exceptiontype] The exception
* type.
* @member {string} [rollbackError.innererror.errordetail] The internal error
* message or exception dump.
* @member {string} [rollbackError.code] The error code.
* @member {string} [rollbackError.target] The target of the particular
* error.
* @member {string} [rollbackError.message] The error message.
*/
constructor() {
}

/**
* Defines the metadata of RollbackStatusInfo
*
* @returns {object} metadata of RollbackStatusInfo
*
*/
mapper() {
return {
required: false,
serializedName: 'RollbackStatusInfo',
type: {
name: 'Composite',
className: 'RollbackStatusInfo',
modelProperties: {
successfullyRolledbackInstanceCount: {
required: false,
readOnly: true,
serializedName: 'successfullyRolledbackInstanceCount',
type: {
name: 'Number'
}
},
failedRolledbackInstanceCount: {
required: false,
readOnly: true,
serializedName: 'failedRolledbackInstanceCount',
type: {
name: 'Number'
}
},
rollbackError: {
required: false,
readOnly: true,
serializedName: 'rollbackError',
type: {
name: 'Composite',
className: 'ApiError'
}
}
}
}
};
}
}

module.exports = RollbackStatusInfo;
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,31 @@ class UpgradeOperationHistoricalStatusInfo {
* latest version of an image available at deploy time. Even if you use
* 'latest', the VM image will not automatically update after deploy time
* even if a new version becomes available.
* @member {object} [properties.rollbackInfo] Information about OS rollback
* if performed
* @member {number}
* [properties.rollbackInfo.successfullyRolledbackInstanceCount] The number
* of instances which have been successfully rolled back.
* @member {number} [properties.rollbackInfo.failedRolledbackInstanceCount]
* The number of instances which failed to rollback.
* @member {object} [properties.rollbackInfo.rollbackError] Error Details if
* OS rollback failed.
* @member {array} [properties.rollbackInfo.rollbackError.details] The Api
* error details
* @member {object} [properties.rollbackInfo.rollbackError.innererror] The
* Api inner error
* @member {string}
* [properties.rollbackInfo.rollbackError.innererror.exceptiontype] The
* exception type.
* @member {string}
* [properties.rollbackInfo.rollbackError.innererror.errordetail] The
* internal error message or exception dump.
* @member {string} [properties.rollbackInfo.rollbackError.code] The error
* code.
* @member {string} [properties.rollbackInfo.rollbackError.target] The target
* of the particular error.
* @member {string} [properties.rollbackInfo.rollbackError.message] The error
* message.
* @member {string} [type] Resource type
* @member {string} [location] Resource location
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,24 @@ class UpgradeOperationHistoricalStatusInfoProperties {
* version of an image available at deploy time. Even if you use 'latest',
* the VM image will not automatically update after deploy time even if a new
* version becomes available.
* @member {object} [rollbackInfo] Information about OS rollback if performed
* @member {number} [rollbackInfo.successfullyRolledbackInstanceCount] The
* number of instances which have been successfully rolled back.
* @member {number} [rollbackInfo.failedRolledbackInstanceCount] The number
* of instances which failed to rollback.
* @member {object} [rollbackInfo.rollbackError] Error Details if OS rollback
* failed.
* @member {array} [rollbackInfo.rollbackError.details] The Api error details
* @member {object} [rollbackInfo.rollbackError.innererror] The Api inner
* error
* @member {string} [rollbackInfo.rollbackError.innererror.exceptiontype] The
* exception type.
* @member {string} [rollbackInfo.rollbackError.innererror.errordetail] The
* internal error message or exception dump.
* @member {string} [rollbackInfo.rollbackError.code] The error code.
* @member {string} [rollbackInfo.rollbackError.target] The target of the
* particular error.
* @member {string} [rollbackInfo.rollbackError.message] The error message.
*/
constructor() {
}
Expand Down Expand Up @@ -120,6 +138,15 @@ class UpgradeOperationHistoricalStatusInfoProperties {
name: 'Composite',
className: 'ImageReference'
}
},
rollbackInfo: {
required: false,
readOnly: true,
serializedName: 'rollbackInfo',
type: {
name: 'Composite',
className: 'RollbackStatusInfo'
}
}
}
}
Expand Down

0 comments on commit 710d70d

Please sign in to comment.