PageRenderTime 42ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

/AzureTableStorage/src/AzureServicesManagement/ServiceManagement/Deployment.cs

#
C# | 561 lines | 356 code | 118 blank | 87 comment | 0 complexity | b22909c2a98b438b4e2e1d96119e6124 MD5 | raw file
  1. //---------------------------------------------------------------------------------
  2. // Microsoft (R) Windows Azure SDK
  3. // Software Development Kit
  4. //
  5. // Copyright (c) Microsoft Corporation. All rights reserved.
  6. //
  7. // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
  8. // EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
  9. // OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
  10. //---------------------------------------------------------------------------------
  11. using System;
  12. using System.Collections.Generic;
  13. using System.Runtime.Serialization;
  14. using System.ServiceModel;
  15. using System.ServiceModel.Web;
  16. using System.Collections.ObjectModel;
  17. using System.Text;
  18. namespace Microsoft.Samples.WindowsAzure.ServiceManagement
  19. {
  20. [DataContract(Name = "Swap", Namespace = Constants.ServiceManagementNS)]
  21. public class SwapDeploymentInput : IExtensibleDataObject
  22. {
  23. [DataMember(Order = 1)]
  24. public string Production { get; set; }
  25. [DataMember(Order = 2)]
  26. public string SourceDeployment { get; set; }
  27. public ExtensionDataObject ExtensionData { get; set; }
  28. }
  29. /// <summary>
  30. /// This class represents a deployment in our deployment-related operations.
  31. /// </summary>
  32. [DataContract(Namespace = Constants.ServiceManagementNS)]
  33. public class Deployment : IExtensibleDataObject
  34. {
  35. [DataMember(Order = 1, EmitDefaultValue = false)]
  36. public string Name { get; set; }
  37. [DataMember(Order = 2, EmitDefaultValue = false)]
  38. public string DeploymentSlot { get; set; }
  39. [DataMember(Order = 3, EmitDefaultValue = false)]
  40. public string PrivateID { get; set; }
  41. /// <summary>
  42. /// The class DeploymentStatus defines its possible values.
  43. /// </summary>
  44. [DataMember(Order = 4, EmitDefaultValue = false)]
  45. public string Status { get; set; }
  46. [DataMember(Order = 5, EmitDefaultValue = false)]
  47. public string Label { get; set; }
  48. [DataMember(Order = 6, EmitDefaultValue = false)]
  49. public Uri Url { get; set; }
  50. [DataMember(Order = 7, EmitDefaultValue = false)]
  51. public string Configuration { get; set; }
  52. [DataMember(Order = 8, EmitDefaultValue = false)]
  53. public RoleInstanceList RoleInstanceList { get; set; }
  54. [DataMember(Order = 10, EmitDefaultValue = false)]
  55. public UpgradeStatus UpgradeStatus { get; set; }
  56. [DataMember(Order = 11, EmitDefaultValue = false)]
  57. public int UpgradeDomainCount;
  58. [DataMember(Order = 12, EmitDefaultValue = false)]
  59. public RoleList RoleList { get; set; }
  60. public ExtensionDataObject ExtensionData { get; set; }
  61. }
  62. [CollectionDataContract(Name = "RoleList", ItemName = "Role", Namespace = Constants.ServiceManagementNS)]
  63. public class RoleList : List<Role>
  64. {
  65. public RoleList()
  66. {
  67. }
  68. public RoleList(IEnumerable<Role> roles)
  69. : base(roles)
  70. {
  71. }
  72. }
  73. [DataContract(Namespace = Constants.ServiceManagementNS)]
  74. public class Role : IExtensibleDataObject
  75. {
  76. [DataMember(Order = 1)]
  77. public string RoleName { get; set; }
  78. [DataMember(Order = 2)]
  79. public string OsVersion { get; set; }
  80. public ExtensionDataObject ExtensionData { get; set; }
  81. }
  82. [CollectionDataContract(Name = "RoleInstanceList", ItemName = "RoleInstance", Namespace = Constants.ServiceManagementNS)]
  83. public class RoleInstanceList : List<RoleInstance>
  84. {
  85. public RoleInstanceList()
  86. {
  87. }
  88. public RoleInstanceList(IEnumerable<RoleInstance> roles)
  89. : base(roles)
  90. {
  91. }
  92. }
  93. // @todo: this should implement IExtensibleDataObject. Can we do this without destroying backwards compatibility???
  94. [DataContract(Namespace = Constants.ServiceManagementNS)]
  95. public class RoleInstance : IExtensibleDataObject
  96. {
  97. [DataMember(Order = 1)]
  98. public string RoleName { get; set; }
  99. [DataMember(Order = 2)]
  100. public string InstanceName { get; set; }
  101. [DataMember(Order = 3)]
  102. public string InstanceStatus { get; set; }
  103. public ExtensionDataObject ExtensionData { get; set; }
  104. }
  105. [DataContract(Name = "CreateDeployment", Namespace = Constants.ServiceManagementNS)]
  106. public class CreateDeploymentInput : IExtensibleDataObject
  107. {
  108. [DataMember(Order = 1)]
  109. public string Name { get; set; }
  110. [DataMember(Order = 2)]
  111. public Uri PackageUrl { get; set; }
  112. [DataMember(Order = 3)]
  113. public string Label { get; set; }
  114. [DataMember(Order = 4)]
  115. public string Configuration { get; set; }
  116. [DataMember(Order = 5, EmitDefaultValue = false)]
  117. public bool? StartDeployment { get; set; }
  118. [DataMember(Order = 6, EmitDefaultValue = false)]
  119. public bool? TreatWarningsAsError { get; set; }
  120. public ExtensionDataObject ExtensionData { get; set; }
  121. }
  122. [DataContract(Name = "ChangeConfiguration", Namespace = Constants.ServiceManagementNS)]
  123. public class ChangeConfigurationInput : IExtensibleDataObject
  124. {
  125. [DataMember(Order = 1)]
  126. public string Configuration { get; set; }
  127. [DataMember(Order = 2, EmitDefaultValue = false)]
  128. public bool? TreatWarningsAsError { get; set; }
  129. public ExtensionDataObject ExtensionData { get; set; }
  130. }
  131. [DataContract(Name = "UpdateDeploymentStatus", Namespace = Constants.ServiceManagementNS)]
  132. public class UpdateDeploymentStatusInput : IExtensibleDataObject
  133. {
  134. [DataMember(Order = 1)]
  135. public string Status { get; set; }
  136. public ExtensionDataObject ExtensionData { get; set; }
  137. }
  138. [DataContract(Name = "UpgradeDeployment", Namespace = Constants.ServiceManagementNS)]
  139. public class UpgradeDeploymentInput : IExtensibleDataObject
  140. {
  141. [DataMember(Order = 1)]
  142. public string Mode { get; set; }
  143. [DataMember(Order = 2)]
  144. public Uri PackageUrl { get; set; }
  145. [DataMember(Order = 3)]
  146. public string Configuration { get; set; }
  147. [DataMember(Order = 4)]
  148. public string Label { get; set; }
  149. [DataMember(Order = 5)]
  150. public string RoleToUpgrade { get; set; }
  151. [DataMember(Order = 6, EmitDefaultValue = false)]
  152. public bool? TreatWarningsAsError { get; set; }
  153. public ExtensionDataObject ExtensionData { get; set; }
  154. }
  155. [DataContract(Name = "WalkUpgradeDomain", Namespace = Constants.ServiceManagementNS)]
  156. public class WalkUpgradeDomainInput : IExtensibleDataObject
  157. {
  158. [DataMember(Order = 1)]
  159. public int UpgradeDomain { get; set; }
  160. public ExtensionDataObject ExtensionData { get; set; }
  161. }
  162. [DataContract(Namespace = Constants.ServiceManagementNS)]
  163. public class UpgradeStatus : IExtensibleDataObject
  164. {
  165. [DataMember(Order = 1)]
  166. public string UpgradeType { get; set; }
  167. [DataMember(Order = 2)]
  168. public string CurrentUpgradeDomainState { get; set; }
  169. [DataMember(Order = 3)]
  170. public int CurrentUpgradeDomain { get; set; }
  171. public ExtensionDataObject ExtensionData { get; set; }
  172. }
  173. /// <summary>
  174. /// Represents Warnings in Configuration
  175. /// </summary>
  176. [DataContract(Namespace = Constants.ServiceManagementNS)]
  177. public class ConfigurationWarning : IExtensibleDataObject
  178. {
  179. [DataMember(Order = 1)]
  180. public string WarningCode { get; set; }
  181. [DataMember(Order = 2)]
  182. public string WarningMessage { get; set; }
  183. public ExtensionDataObject ExtensionData { get; set; }
  184. public override string ToString()
  185. {
  186. return string.Format("WarningCode:{0} WarningMessage:{1}", WarningCode, WarningMessage);
  187. }
  188. }
  189. [CollectionDataContract(Namespace = Constants.ServiceManagementNS)]
  190. public class ConfigurationWarningsList : List<ConfigurationWarning>
  191. {
  192. public override string ToString()
  193. {
  194. StringBuilder warnings = new StringBuilder(string.Format("ConfigurationWarnings({0}):\n", this.Count));
  195. foreach (ConfigurationWarning warning in this)
  196. {
  197. warnings.Append(warning + "\n");
  198. }
  199. return warnings.ToString();
  200. }
  201. }
  202. /// <summary>
  203. /// The deployment-specific interface of the resource model service.
  204. /// </summary>
  205. public partial interface IServiceManagement
  206. {
  207. #region Swap Deployment
  208. /// <summary>
  209. /// Swaps the deployment to a production slot.
  210. /// </summary>
  211. [OperationContract(AsyncPattern = true)]
  212. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}")]
  213. IAsyncResult BeginSwapDeployment(string subscriptionId, string serviceName, SwapDeploymentInput input, AsyncCallback callback, object state);
  214. void EndSwapDeployment(IAsyncResult asyncResult);
  215. #endregion
  216. #region Create Deployment
  217. /// <summary>
  218. /// Creates a deployment.
  219. /// </summary>
  220. [OperationContract(AsyncPattern = true)]
  221. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}")]
  222. IAsyncResult BeginCreateOrUpdateDeployment(string subscriptionId, string serviceName, string deploymentSlot, CreateDeploymentInput input, AsyncCallback callback, object state);
  223. void EndCreateOrUpdateDeployment(IAsyncResult asyncResult);
  224. #endregion
  225. #region Delete Deployment
  226. /// <summary>
  227. /// Deletes the specified deployment. This works against either through the slot or through the name.This is an asynchronous operation.
  228. /// Only implements deleting by deployment name right now.
  229. /// </summary>
  230. [OperationContract(AsyncPattern = true)]
  231. [WebInvoke(Method = "DELETE", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}")]
  232. IAsyncResult BeginDeleteDeployment(string subscriptionId, string serviceName, string deploymentName, AsyncCallback callback, object state);
  233. void EndDeleteDeployment(IAsyncResult asyncResult);
  234. /// <summary>
  235. /// Deletes the specified deployment. This works against either through the slot or through the name.This is an asynchronous operation.
  236. /// Only implements deleting by deployment name right now.
  237. /// </summary>
  238. [OperationContract(AsyncPattern = true)]
  239. [WebInvoke(Method = "DELETE", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}")]
  240. IAsyncResult BeginDeleteDeploymentBySlot(string subscriptionId, string serviceName, string deploymentSlot, AsyncCallback callback, object state);
  241. void EndDeleteDeploymentBySlot(IAsyncResult asyncResult);
  242. #endregion
  243. #region Get Deployment
  244. /// <summary>
  245. /// Gets the specified deployment details.
  246. /// </summary>
  247. [OperationContract(AsyncPattern = true)]
  248. [WebGet(UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}")]
  249. IAsyncResult BeginGetDeployment(string subscriptionId, string serviceName, string deploymentName, AsyncCallback callback, object state);
  250. Deployment EndGetDeployment(IAsyncResult asyncResult);
  251. /// <summary>
  252. /// Gets the specified deployment details.
  253. /// </summary>
  254. [OperationContract(AsyncPattern = true)]
  255. [WebGet(UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}")]
  256. IAsyncResult BeginGetDeploymentBySlot(string subscriptionId, string serviceName, string deploymentSlot, AsyncCallback callback, object state);
  257. Deployment EndGetDeploymentBySlot(IAsyncResult asyncResult);
  258. #endregion
  259. #region Change Deployment Config
  260. /// <summary>
  261. /// Initiates a change to the deployment. This works against through the deployment name.
  262. /// This is an asynchronous operation
  263. /// </summary>
  264. [OperationContract(AsyncPattern = true)]
  265. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=config")]
  266. IAsyncResult BeginChangeConfiguration(string subscriptionId, string serviceName, string deploymentName, ChangeConfigurationInput input, AsyncCallback callback, object state);
  267. void EndChangeConfiguration(IAsyncResult asyncResult);
  268. /// <summary>
  269. /// Initiates a change to the deployment. This works against through the slot name.
  270. /// This is an asynchronous operation
  271. /// </summary>
  272. [OperationContract(AsyncPattern = true)]
  273. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=config")]
  274. IAsyncResult BeginChangeConfigurationBySlot(string subscriptionId, string serviceName, string deploymentSlot, ChangeConfigurationInput input, AsyncCallback callback, object state);
  275. void EndChangeConfigurationBySlot(IAsyncResult asyncResult);
  276. #endregion
  277. #region Update Deployment Status
  278. /// <summary>
  279. /// Initiates a change to the deployment. This works against through the deployment name.
  280. /// This is an asynchronous operation
  281. /// </summary>
  282. [OperationContract(AsyncPattern = true)]
  283. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=status")]
  284. IAsyncResult BeginUpdateDeploymentStatus(string subscriptionId, string serviceName, string deploymentName, UpdateDeploymentStatusInput input, AsyncCallback callback, object state);
  285. void EndUpdateDeploymentStatus(IAsyncResult asyncResult);
  286. /// <summary>
  287. /// Initiates a change to the deployment. This works against through the slot name.
  288. /// This is an asynchronous operation
  289. /// </summary>
  290. [OperationContract(AsyncPattern = true)]
  291. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=status")]
  292. IAsyncResult BeginUpdateDeploymentStatusBySlot(string subscriptionId, string serviceName, string deploymentSlot, UpdateDeploymentStatusInput input, AsyncCallback callback, object state);
  293. void EndUpdateDeploymentStatusBySlot(IAsyncResult asyncResult);
  294. #endregion
  295. #region Upgrade Deployment
  296. /// <summary>
  297. /// Initiates an deployment upgrade.
  298. /// This is an asynchronous operation
  299. /// </summary>
  300. [OperationContract(AsyncPattern = true)]
  301. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=upgrade")]
  302. IAsyncResult BeginUpgradeDeployment(string subscriptionId, string serviceName, string deploymentName, UpgradeDeploymentInput input, AsyncCallback callback, object state);
  303. void EndUpgradeDeployment(IAsyncResult asyncResult);
  304. /// <summary>
  305. /// Initiates an deployment upgrade through the slot name.
  306. /// This is an asynchronous operation
  307. /// </summary>
  308. [OperationContract(AsyncPattern = true)]
  309. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=upgrade")]
  310. IAsyncResult BeginUpgradeDeploymentBySlot(string subscriptionId, string serviceName, string deploymentSlot, UpgradeDeploymentInput input, AsyncCallback callback, object state);
  311. void EndUpgradeDeploymentBySlot(IAsyncResult asyncResult);
  312. #endregion
  313. #region Walk Upgrade Domain
  314. /// <summary>
  315. /// Initiates an deployment upgrade.
  316. /// This is an asynchronous operation
  317. /// </summary>
  318. [OperationContract(AsyncPattern = true)]
  319. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=walkupgradedomain")]
  320. IAsyncResult BeginWalkUpgradeDomain(string subscriptionId, string serviceName, string deploymentName, WalkUpgradeDomainInput input, AsyncCallback callback, object state);
  321. void EndWalkUpgradeDomain(IAsyncResult asyncResult);
  322. /// <summary>
  323. /// Initiates an deployment upgrade through the slot name.
  324. /// This is an asynchronous operation
  325. /// </summary>
  326. [OperationContract(AsyncPattern = true)]
  327. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=walkupgradedomain")]
  328. IAsyncResult BeginWalkUpgradeDomainBySlot(string subscriptionId, string serviceName, string deploymentSlot, WalkUpgradeDomainInput input, AsyncCallback callback, object state);
  329. void EndWalkUpgradeDomainBySlot(IAsyncResult asyncResult);
  330. #endregion
  331. #region Reboot Deployment Role Instance
  332. /// <summary>
  333. /// Reboots a role instance in a deployment by name
  334. /// </summary>
  335. [OperationContract(AsyncPattern = true)]
  336. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/roleinstances/{roleinstancename}?comp=reboot")]
  337. IAsyncResult BeginRebootDeploymentRoleInstance(string subscriptionId, string serviceName, string deploymentName, string roleInstanceName, AsyncCallback callback, object state);
  338. void EndRebootDeploymentRoleInstance(IAsyncResult asyncResult);
  339. #endregion
  340. #region Reimage Deployment Role Instance
  341. /// <summary>
  342. /// Reimages a role instance in a deployment by name
  343. /// </summary>
  344. [OperationContract(AsyncPattern = true)]
  345. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/roleinstances/{roleinstancename}?comp=reimage")]
  346. IAsyncResult BeginReimageDeploymentRoleInstance(string subscriptionId, string serviceName, string deploymentName, string roleInstanceName, AsyncCallback callback, object state);
  347. void EndReimageDeploymentRoleInstance(IAsyncResult asyncResult);
  348. #endregion
  349. #region Reboot Deployment Role Instance By Slot
  350. /// <summary>
  351. /// Reboots a role instance in a deployment by slot
  352. /// </summary>
  353. [OperationContract(AsyncPattern = true)]
  354. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/roleinstances/{roleinstancename}?comp=reboot")]
  355. IAsyncResult BeginRebootDeploymentRoleInstanceBySlot(string subscriptionId, string serviceName, string deploymentSlot, string roleInstanceName, AsyncCallback callback, object state);
  356. void EndRebootDeploymentRoleInstanceBySlot(IAsyncResult asyncResult);
  357. #endregion
  358. #region Reimage Deployment Role Instance By Slot
  359. /// <summary>
  360. /// Reimages a role instance in a deployment by slot
  361. /// </summary>
  362. [OperationContract(AsyncPattern = true)]
  363. [WebInvoke(Method = "POST", UriTemplate = @"{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/roleinstances/{roleinstancename}?comp=reimage")]
  364. IAsyncResult BeginReimageDeploymentRoleInstanceBySlot(string subscriptionId, string serviceName, string deploymentSlot, string roleInstanceName, AsyncCallback callback, object state);
  365. void EndReimageDeploymentRoleInstanceBySlot(IAsyncResult asyncResult);
  366. #endregion
  367. }
  368. public static partial class ServiceManagementExtensionMethods
  369. {
  370. public static void SwapDeployment(this IServiceManagement proxy, string subscriptionId, string serviceName, SwapDeploymentInput input)
  371. {
  372. proxy.EndSwapDeployment(proxy.BeginSwapDeployment(subscriptionId, serviceName, input, null, null));
  373. }
  374. public static void CreateOrUpdateDeployment(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentSlot, CreateDeploymentInput input)
  375. {
  376. proxy.EndCreateOrUpdateDeployment(proxy.BeginCreateOrUpdateDeployment(subscriptionId, serviceName, deploymentSlot, input, null, null));
  377. }
  378. public static void DeleteDeployment(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentName)
  379. {
  380. proxy.EndDeleteDeployment(proxy.BeginDeleteDeployment(subscriptionId, serviceName, deploymentName, null, null));
  381. }
  382. public static void DeleteDeploymentBySlot(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentSlot)
  383. {
  384. proxy.EndDeleteDeploymentBySlot(proxy.BeginDeleteDeploymentBySlot(subscriptionId, serviceName, deploymentSlot, null, null));
  385. }
  386. public static Deployment GetDeployment(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentName)
  387. {
  388. return proxy.EndGetDeployment(proxy.BeginGetDeployment(subscriptionId, serviceName, deploymentName, null, null));
  389. }
  390. public static Deployment GetDeploymentBySlot(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentSlot)
  391. {
  392. return proxy.EndGetDeploymentBySlot(proxy.BeginGetDeploymentBySlot(subscriptionId, serviceName, deploymentSlot, null, null));
  393. }
  394. public static void UpdateDeploymentStatus(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentName, UpdateDeploymentStatusInput input)
  395. {
  396. proxy.EndUpdateDeploymentStatus(proxy.BeginUpdateDeploymentStatus(subscriptionId, serviceName, deploymentName, input, null, null));
  397. }
  398. public static void UpdateDeploymentStatusBySlot(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentSlot, UpdateDeploymentStatusInput input)
  399. {
  400. proxy.EndUpdateDeploymentStatusBySlot(proxy.BeginUpdateDeploymentStatusBySlot(subscriptionId, serviceName, deploymentSlot, input, null, null));
  401. }
  402. public static void ChangeConfiguration(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentName, ChangeConfigurationInput input)
  403. {
  404. proxy.EndChangeConfiguration(proxy.BeginChangeConfiguration(subscriptionId, serviceName, deploymentName, input, null, null));
  405. }
  406. public static void ChangeConfigurationBySlot(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentSlot, ChangeConfigurationInput input)
  407. {
  408. proxy.EndChangeConfigurationBySlot(proxy.BeginChangeConfigurationBySlot(subscriptionId, serviceName, deploymentSlot, input, null, null));
  409. }
  410. public static void UpgradeDeployment(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentName, UpgradeDeploymentInput input)
  411. {
  412. proxy.EndUpgradeDeployment(proxy.BeginUpgradeDeployment(subscriptionId, serviceName, deploymentName, input, null, null));
  413. }
  414. public static void UpgradeDeploymentBySlot(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentSlot, UpgradeDeploymentInput input)
  415. {
  416. proxy.EndUpgradeDeploymentBySlot(proxy.BeginUpgradeDeploymentBySlot(subscriptionId, serviceName, deploymentSlot, input, null, null));
  417. }
  418. public static void WalkUpgradeDomain(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentName, WalkUpgradeDomainInput input)
  419. {
  420. proxy.EndWalkUpgradeDomain(proxy.BeginWalkUpgradeDomain(subscriptionId, serviceName, deploymentName, input, null, null));
  421. }
  422. public static void WalkUpgradeDomainBySlot(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentSlot, WalkUpgradeDomainInput input)
  423. {
  424. proxy.EndWalkUpgradeDomainBySlot(proxy.BeginWalkUpgradeDomainBySlot(subscriptionId, serviceName, deploymentSlot, input, null, null));
  425. }
  426. public static void RebootDeploymentRoleInstance(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentName, string roleInstanceName)
  427. {
  428. proxy.EndRebootDeploymentRoleInstance(proxy.BeginRebootDeploymentRoleInstance(subscriptionId, serviceName, deploymentName, roleInstanceName, null, null));
  429. }
  430. public static void ReimageDeploymentRoleInstance(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentName, string roleInstanceName)
  431. {
  432. proxy.EndReimageDeploymentRoleInstance(proxy.BeginReimageDeploymentRoleInstance(subscriptionId, serviceName, deploymentName, roleInstanceName, null, null));
  433. }
  434. public static void RebootDeploymentRoleInstanceBySlot(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentSlot, string roleInstanceName)
  435. {
  436. proxy.EndRebootDeploymentRoleInstanceBySlot(proxy.BeginRebootDeploymentRoleInstanceBySlot(subscriptionId, serviceName, deploymentSlot, roleInstanceName, null, null));
  437. }
  438. public static void ReimageDeploymentRoleInstanceBySlot(this IServiceManagement proxy, string subscriptionId, string serviceName, string deploymentSlot, string roleInstanceName)
  439. {
  440. proxy.EndReimageDeploymentRoleInstanceBySlot(proxy.BeginReimageDeploymentRoleInstanceBySlot(subscriptionId, serviceName, deploymentSlot, roleInstanceName, null, null));
  441. }
  442. }
  443. }