Changeset 7441
- Timestamp:
- 02/01/12 15:14:22 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/Constants.cs
r7421 r7441 85 85 public const string DeploymentConfigurationPath = "files/ServiceConfiguration.Cloud.cscfg"; 86 86 public const string DeploymentLabel = "HeuristicLab.Hive.Slave"; 87 public const string DeploymentRoleName = "HeuristicLab.Clients.Hive.Slave.AzureClient"; 87 88 88 89 #endregion -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CloudManagerClient.cs
r7433 r7441 148 148 } 149 149 150 public void ChangeIntances(Deployment deployment, HostedService hostedService) { 151 if (deployment == null) { 152 throw new ArgumentNullException("Deployment", "Deployment must not be null."); 153 } 154 if (hostedService == null) { 155 throw new ArgumentNullException("HostedService", "HostedService must not be null."); 156 } 157 if (deployment.Modified) { 158 AzureProvider.ChangeInstanceCount(deployment.Subscription, 159 hostedService.ServiceName, 160 deployment.DeploymentSlot, 161 HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.DeploymentRoleName, 162 deployment.NewInstanceCount); 163 deployment.Modified = false; 164 } 165 } 166 167 public void Delete(Deployment deployment, HostedService hostedService) { 168 if (deployment == null) { 169 throw new ArgumentNullException("Deployment", "Deployment must not be null."); 170 } 171 if (hostedService == null) { 172 throw new ArgumentNullException("HostedService", "HostedService must not be null."); 173 } 174 //AzureProvider.DeleteDeployment(); 175 } 176 177 public void Delete(HostedService hostedService) { 178 if (hostedService == null) { 179 throw new ArgumentNullException("HostedService", "HostedService must not be null."); 180 } 181 AzureProvider.DeleteHostedService(hostedService.Subscription, hostedService.ServiceName); 182 } 183 184 public void Delete(Subscription subscription) { 185 if (subscription == null) { 186 throw new ArgumentNullException("subscription", "Subscription must not be null."); 187 } 188 if (Subscriptions.Contains(subscription)) { 189 Subscriptions.Remove(subscription); 190 } 191 } 192 150 193 151 194 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.Designer.cs
r7403 r7441 71 71 this.btnSave.TabIndex = 4; 72 72 this.btnSave.UseVisualStyleBackColor = true; 73 this.btnSave.Click += new System.EventHandler(this.btnSave_Click); 73 74 // 74 75 // btnDelete … … 80 81 this.btnDelete.TabIndex = 3; 81 82 this.btnDelete.UseVisualStyleBackColor = true; 83 this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); 82 84 // 83 85 // btnAddSlaveService -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.cs
r7433 r7441 292 292 viewHost.Content = (IContent)e.Node.Tag; 293 293 } 294 295 private void btnSave_Click(object sender, EventArgs e) { 296 if (treeCloudResources.SelectedNode != null) { 297 TreeNode tn = treeCloudResources.SelectedNode; 298 TreeNode tnParent = tn.Parent; 299 Object obj = tn.Tag; 300 Object objParent = tnParent.Tag; 301 if (obj is Subscription) { 302 // CloudManagerClient.Instance.Save((Subscription)obj); 303 } else if (obj is HostedService) { 304 // nothing to do so far 305 } else if (obj is Deployment && objParent is HostedService) { 306 HostedService hs = (HostedService)objParent; 307 Deployment dep = (Deployment)obj; 308 //call async 309 CloudManagerClient.Instance.ChangeIntances(dep, hs); 310 } 311 } 312 } 313 314 private void btnDelete_Click(object sender, EventArgs e) { 315 if (treeCloudResources.SelectedNode != null) { 316 TreeNode tn = treeCloudResources.SelectedNode; 317 TreeNode tnParent = tn.Parent; 318 Object obj = tn.Tag; 319 Object objParent = null; 320 if (tnParent != null) { 321 objParent = tnParent.Tag; 322 } 323 viewHost.Content = null; 324 if (obj is Subscription) { 325 CloudManagerClient.Instance.Delete((Subscription)obj); 326 } else if (obj is HostedService) { 327 // nothing to do so far 328 } else if (obj is Deployment && objParent is HostedService) { 329 HostedService hs = (HostedService)objParent; 330 Deployment dep = (Deployment)obj; 331 //call async 332 CloudManagerClient.Instance.Delete(dep, hs); 333 } 334 } 335 } 294 336 } 295 337 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/DeploymentView.cs
r7433 r7441 48 48 } else { 49 49 tbChangeCores.Value = Content.RoleInstanceList.Count; 50 lblChanges.Text = ""; 50 51 } 51 52
Note: See TracChangeset
for help on using the changeset viewer.