Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7299


Ignore:
Timestamp:
01/09/12 16:14:57 (13 years ago)
Author:
spimming
Message:

#1680:

  • Azure management utils initial version added
  • View for cloud resources
Location:
branches/HeuristicLab.Hive.Azure
Files:
9 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive.Azure/HeuristicLab 3.3.sln

    r7270 r7299  
    272272EndProject
    273273Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.Benchmarks.Views-3.3", "HeuristicLab.Algorithms.Benchmarks.Views\3.3\HeuristicLab.Algorithms.Benchmarks.Views-3.3.csproj", "{3C906172-E044-4DF0-B4FD-AA21192D5D3E}"
     274EndProject
     275Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Clients.Hive.CloudManager-3.3", "HeuristicLab.Clients.Hive.CloudManager\3.3\HeuristicLab.Clients.Hive.CloudManager-3.3.csproj", "{956FCB16-E3A8-4B5C-8BF4-C36DCBE827D0}"
    274276EndProject
    275277Global
     
    13301332    {3C906172-E044-4DF0-B4FD-AA21192D5D3E}.Release|x86.ActiveCfg = Release|x86
    13311333    {3C906172-E044-4DF0-B4FD-AA21192D5D3E}.Release|x86.Build.0 = Release|x86
     1334    {956FCB16-E3A8-4B5C-8BF4-C36DCBE827D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     1335    {956FCB16-E3A8-4B5C-8BF4-C36DCBE827D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
     1336    {956FCB16-E3A8-4B5C-8BF4-C36DCBE827D0}.Debug|x64.ActiveCfg = Debug|Any CPU
     1337    {956FCB16-E3A8-4B5C-8BF4-C36DCBE827D0}.Debug|x86.ActiveCfg = Debug|Any CPU
     1338    {956FCB16-E3A8-4B5C-8BF4-C36DCBE827D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
     1339    {956FCB16-E3A8-4B5C-8BF4-C36DCBE827D0}.Release|Any CPU.Build.0 = Release|Any CPU
     1340    {956FCB16-E3A8-4B5C-8BF4-C36DCBE827D0}.Release|x64.ActiveCfg = Release|Any CPU
     1341    {956FCB16-E3A8-4B5C-8BF4-C36DCBE827D0}.Release|x86.ActiveCfg = Release|Any CPU
    13321342  EndGlobalSection
    13331343  GlobalSection(SolutionProperties) = preSolution
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CloudManagerClient.cs

    r7278 r7299  
    1 using HeuristicLab.Common;
     1using System;
     2using HeuristicLab.Clients.Hive.CloudManager.Azure;
     3using HeuristicLab.Clients.Hive.CloudManager.Model;
     4using HeuristicLab.Common;
    25using HeuristicLab.Core;
    36
     
    1619
    1720    #region Properties
     21    private ItemCollection<Subscription> subscriptions;
     22    public ItemCollection<Subscription> Subscriptions {
     23      get { return subscriptions; }
     24      set {
     25        if (value != subscriptions) {
     26          subscriptions = value;
     27          //fire event OnSubscriptionsChagned
     28        }
     29      }
     30    }
     31
     32    private IAzureProvider azureProvider;
     33    public IAzureProvider AzureProvider {
     34      get { return azureProvider; }
     35      set { azureProvider = value; }
     36    }
     37
     38    #endregion
     39
     40    #region Events
     41
     42    public event EventHandler Refreshing;
     43    private void OnRefreshing() {
     44      EventHandler handler = Refreshing;
     45      if (handler != null) handler(this, EventArgs.Empty);
     46    }
     47    public event EventHandler Refreshed;
     48    private void OnRefreshed() {
     49      var handler = Refreshed;
     50      if (handler != null) handler(this, EventArgs.Empty);
     51    }
     52
     53    #endregion
     54
     55    #region Refresh
     56
     57    public void Refresh() {
     58      OnRefreshing();
     59
     60      try {
     61
     62      }
     63      catch {
     64        throw;
     65      }
     66      finally {
     67        OnRefreshed();
     68      }
     69    }
     70
    1871    #endregion
    1972
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/HeuristicLab.Clients.Hive.CloudManager-3.3.csproj

    r7281 r7299  
    4949  </ItemGroup>
    5050  <ItemGroup>
     51    <Compile Include="Azure\AzureProvider.cs" />
     52    <Compile Include="Azure\Constants.cs" />
     53    <Compile Include="Azure\IAzureProvider.cs" />
     54    <Compile Include="Azure\ServiceManagementOperation.cs" />
     55    <Compile Include="Azure\ServiceWebRequest.cs" />
     56    <Compile Include="Azure\Utils.cs" />
    5157    <Compile Include="CloudManagerClient.cs" />
    5258    <Compile Include="MenuItems\CloudManagerMenuItem.cs" />
     
    5460    <Compile Include="Plugin.cs" />
    5561    <Compile Include="Properties\AssemblyInfo.cs" />
     62    <Compile Include="Properties\Resources.Designer.cs">
     63      <AutoGen>True</AutoGen>
     64      <DesignTime>True</DesignTime>
     65      <DependentUpon>Resources.resx</DependentUpon>
     66    </Compile>
    5667    <Compile Include="Views\AddSubscriptionDialog.cs">
    5768      <SubType>Form</SubType>
     
    131142  </ItemGroup>
    132143  <ItemGroup>
     144    <EmbeddedResource Include="Properties\Resources.resx">
     145      <Generator>ResXFileCodeGenerator</Generator>
     146      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
     147    </EmbeddedResource>
    133148    <EmbeddedResource Include="Views\AddSubscriptionDialog.resx">
    134149      <DependentUpon>AddSubscriptionDialog.cs</DependentUpon>
     150    </EmbeddedResource>
     151    <EmbeddedResource Include="Views\CloudResourcesView.resx">
     152      <DependentUpon>CloudResourcesView.cs</DependentUpon>
    135153    </EmbeddedResource>
    136154    <EmbeddedResource Include="Views\HiveCloudManagerView.resx">
     
    141159    </EmbeddedResource>
    142160  </ItemGroup>
     161  <ItemGroup />
    143162  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    144163  <PropertyGroup>
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/Subscription.cs

    r7281 r7299  
    1 using System.Text;
     1using System;
     2using System.Text;
    23using HeuristicLab.Common;
    34using HeuristicLab.Core;
    45
    56namespace HeuristicLab.Clients.Hive.CloudManager.Model {
    6   public class Subscription : Item, IContent {
     7  public class Subscription : Item {
    78    public string SubscriptionID { get; set; }
    89    public string SubscriptionName { get; set; }
     10    public string SubscriptionStatus { get; set; }
    911    public int MaxCoreCount { get; set; }
    1012    public int MaxHostedServices { get; set; }
     13    public int MaxStorageAccounts { get; set; }
    1114    public int CurrentCoreCount { get; set; }
    1215    public int CurrentHostedServices { get; set; }
     16    public int CurrentStorageAccounts { get; set; }
    1317    public string CertificateThumbprint { get; set; }
    1418    public bool SaveToConfig { get; set; }
     
    2024
    2125    public Subscription(Subscription original, Cloner cloner) {
    22 
     26      this.SubscriptionID = original.SubscriptionID;
     27      this.SubscriptionName = original.SubscriptionName;
     28      this.SubscriptionStatus = original.SubscriptionStatus;
     29      this.MaxCoreCount = original.MaxCoreCount;
     30      this.MaxHostedServices = original.MaxHostedServices;
     31      this.MaxStorageAccounts = original.MaxStorageAccounts;
     32      this.CurrentCoreCount = original.CurrentCoreCount;
     33      this.CurrentHostedServices = original.CurrentHostedServices;
     34      this.CurrentStorageAccounts = original.CurrentStorageAccounts;
     35      this.CertificateThumbprint = original.CertificateThumbprint;
     36      this.SaveToConfig = original.SaveToConfig;
     37      this.DiscoverServices = original.DiscoverServices;
    2338    }
    2439
     
    4863      return new Subscription(this, cloner);
    4964    }
     65
     66    public void Merge(Subscription subscription) {
     67      if (!this.Equals(subscription)) {
     68        throw new ArgumentException("Objects must be equal to be merged.", "subscription");
     69      }
     70      this.SubscriptionName = subscription.SubscriptionName;
     71      this.SubscriptionStatus = subscription.SubscriptionStatus;
     72      this.MaxCoreCount = subscription.MaxCoreCount;
     73      this.MaxHostedServices = subscription.MaxHostedServices;
     74      this.MaxStorageAccounts = subscription.MaxStorageAccounts;
     75      this.CurrentCoreCount = subscription.CurrentCoreCount;
     76      this.CurrentHostedServices = subscription.CurrentHostedServices;
     77      this.CurrentStorageAccounts = subscription.CurrentStorageAccounts;
     78      this.CertificateThumbprint = subscription.CertificateThumbprint;
     79      this.SaveToConfig = subscription.SaveToConfig;
     80      this.DiscoverServices = subscription.DiscoverServices;
     81    }
    5082  }
    5183}
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.Designer.cs

    r7281 r7299  
    2424    /// </summary>
    2525    private void InitializeComponent() {
    26       components = new System.ComponentModel.Container();
     26      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CloudResourcesView));
     27      this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     28      this.label1 = new System.Windows.Forms.Label();
     29      this.btnSave = new System.Windows.Forms.Button();
     30      this.btnDelete = new System.Windows.Forms.Button();
     31      this.btnAddSlaveService = new System.Windows.Forms.Button();
     32      this.btnAddSubscription = new System.Windows.Forms.Button();
     33      this.treeCloudResources = new System.Windows.Forms.TreeView();
     34      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
     35      this.splitContainer1.Panel1.SuspendLayout();
     36      this.splitContainer1.SuspendLayout();
     37      this.SuspendLayout();
     38      //
     39      // splitContainer1
     40      //
     41      this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
     42      this.splitContainer1.Location = new System.Drawing.Point(0, 0);
     43      this.splitContainer1.Name = "splitContainer1";
     44      //
     45      // splitContainer1.Panel1
     46      //
     47      this.splitContainer1.Panel1.Controls.Add(this.label1);
     48      this.splitContainer1.Panel1.Controls.Add(this.btnSave);
     49      this.splitContainer1.Panel1.Controls.Add(this.btnDelete);
     50      this.splitContainer1.Panel1.Controls.Add(this.btnAddSlaveService);
     51      this.splitContainer1.Panel1.Controls.Add(this.btnAddSubscription);
     52      this.splitContainer1.Panel1.Controls.Add(this.treeCloudResources);
     53      this.splitContainer1.Size = new System.Drawing.Size(670, 497);
     54      this.splitContainer1.SplitterDistance = 249;
     55      this.splitContainer1.TabIndex = 0;
     56      //
     57      // label1
     58      //
     59      this.label1.AutoSize = true;
     60      this.label1.Location = new System.Drawing.Point(127, 10);
     61      this.label1.Name = "label1";
     62      this.label1.Size = new System.Drawing.Size(126, 13);
     63      this.label1.TabIndex = 5;
     64      this.label1.Text = "Done. 5s to  next refresh.";
     65      //
     66      // btnSave
     67      //
     68      this.btnSave.Image = HeuristicLab.Common.Resources.VSImageLibrary.PublishToWeb;
     69      this.btnSave.Location = new System.Drawing.Point(97, 4);
     70      this.btnSave.Name = "btnSave";
     71      this.btnSave.Size = new System.Drawing.Size(24, 24);
     72      this.btnSave.TabIndex = 4;
     73      this.btnSave.UseVisualStyleBackColor = true;
     74      //
     75      // btnDelete
     76      //
     77      this.btnDelete.Image = HeuristicLab.Common.Resources.VSImageLibrary.Delete;
     78      this.btnDelete.Location = new System.Drawing.Point(66, 4);
     79      this.btnDelete.Name = "btnDelete";
     80      this.btnDelete.Size = new System.Drawing.Size(24, 24);
     81      this.btnDelete.TabIndex = 3;
     82      this.btnDelete.UseVisualStyleBackColor = true;
     83      //
     84      // btnAddSlaveService
     85      //
     86      this.btnAddSlaveService.Image = HeuristicLab.Common.Resources.VSImageLibrary.NewDocument;
     87      this.btnAddSlaveService.Location = new System.Drawing.Point(35, 4);
     88      this.btnAddSlaveService.Name = "btnAddSlaveService";
     89      this.btnAddSlaveService.Size = new System.Drawing.Size(24, 24);
     90      this.btnAddSlaveService.TabIndex = 2;
     91      this.btnAddSlaveService.UseVisualStyleBackColor = true;
     92      //
     93      // btnAddSubscription
     94      //
     95      this.btnAddSubscription.Image = HeuristicLab.Common.Resources.VSImageLibrary.NewFolder;
     96      this.btnAddSubscription.Location = new System.Drawing.Point(4, 4);
     97      this.btnAddSubscription.Name = "btnAddSubscription";
     98      this.btnAddSubscription.Size = new System.Drawing.Size(24, 24);
     99      this.btnAddSubscription.TabIndex = 1;
     100      this.btnAddSubscription.UseVisualStyleBackColor = true;
     101      //
     102      // treeCloudResources
     103      //
     104      this.treeCloudResources.Location = new System.Drawing.Point(3, 34);
     105      this.treeCloudResources.Name = "treeCloudResources";
     106      this.treeCloudResources.Size = new System.Drawing.Size(243, 460);
     107      this.treeCloudResources.TabIndex = 0;
     108      //
     109      // CloudResourcesView
     110      //
     111      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    27112      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     113      this.Controls.Add(this.splitContainer1);
     114      this.Name = "CloudResourcesView";
     115      this.Size = new System.Drawing.Size(670, 497);
     116      this.splitContainer1.Panel1.ResumeLayout(false);
     117      this.splitContainer1.Panel1.PerformLayout();
     118      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
     119      this.splitContainer1.ResumeLayout(false);
     120      this.ResumeLayout(false);
     121
    28122    }
    29123
    30124    #endregion
     125
     126    private System.Windows.Forms.SplitContainer splitContainer1;
     127    private System.Windows.Forms.TreeView treeCloudResources;
     128    private System.Windows.Forms.Button btnAddSubscription;
     129    private System.Windows.Forms.Button btnSave;
     130    private System.Windows.Forms.Button btnDelete;
     131    private System.Windows.Forms.Button btnAddSlaveService;
     132    private System.Windows.Forms.Label label1;
    31133  }
    32134}
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/HiveCloudManagerView.cs

    r7278 r7299  
    3939      InitializeComponent();
    4040    }
     41
     42    #region Register Content Events
     43    protected override void DeregisterContentEvents() {
     44      base.DeregisterContentEvents();
     45    }
     46    protected override void RegisterContentEvents() {
     47      base.RegisterContentEvents();
     48    }
     49    #endregion
     50
     51    #region Content Events
     52
     53    protected override void OnContentChanged() {
     54      base.OnContentChanged();
     55    }
     56
     57    protected override void SetEnabledStateOfControls() {
     58      base.SetEnabledStateOfControls();
     59    }
     60
     61    #endregion
    4162  }
    4263}
Note: See TracChangeset for help on using the changeset viewer.