1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System.Xml.Linq;
|
---|
23 | namespace HeuristicLab.Clients.Hive.CloudManager.Azure {
|
---|
24 | public static class Constants {
|
---|
25 | #region HeuristicLab
|
---|
26 |
|
---|
27 | public const string HLSlaveRoleName = "HeuristicLab.Clients.Hive.Slave.AzureClient";
|
---|
28 |
|
---|
29 | #endregion
|
---|
30 |
|
---|
31 | #region Service Management Versioning
|
---|
32 | // see: http://msdn.microsoft.com/en-us/library/windowsazure/gg592580.aspx
|
---|
33 |
|
---|
34 | public const string APIVersionDefault = APIVersion20111001;
|
---|
35 | public const string APIVersion20111001 = "2011-10-01";
|
---|
36 | public const string APIVersion20110225 = "2011-02-25";
|
---|
37 | public const string APIVersion20110818 = "2011-08-18";
|
---|
38 |
|
---|
39 | #endregion
|
---|
40 |
|
---|
41 | #region Namespaces
|
---|
42 |
|
---|
43 | public static XNamespace NSWindowsAzure { get { return "http://schemas.microsoft.com/windowsazure"; } }
|
---|
44 | public static XNamespace NSSchemaMicrosoft { get { return "http://schemas.microsoft.com/"; } }
|
---|
45 | public static XNamespace NSServiceConfiguration { get { return "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"; } }
|
---|
46 |
|
---|
47 | #endregion
|
---|
48 |
|
---|
49 | #region Web Request
|
---|
50 |
|
---|
51 | public const string HeaderRequestId = "x-ms-request-id";
|
---|
52 | public const string HeaderVersionName = "x-ms-version";
|
---|
53 | public const string ContentTypeAppXml = "application/xml";
|
---|
54 |
|
---|
55 | public const string HttpMethodPOST = "POST";
|
---|
56 | public const string HttpMethodGET = "GET";
|
---|
57 | public const string HttpMethodDELETE = "DELETE";
|
---|
58 |
|
---|
59 | #endregion
|
---|
60 |
|
---|
61 | #region Service Management URIs
|
---|
62 | // see: http://msdn.microsoft.com/en-us/library/ee460786.aspx
|
---|
63 |
|
---|
64 | public const string URISubscriptionFormat = "https://management.core.windows.net/{0}";
|
---|
65 | public const string URIHostedServiceFormat = "https://management.core.windows.net/{0}/services/hostedservices";
|
---|
66 | public const string URISpecificHostedServiceFormat = "https://management.core.windows.net/{0}/services/hostedservices/{1}";
|
---|
67 | public const string URILocationsFormat = "https://management.core.windows.net/{0}/locations";
|
---|
68 | public const string URIAffinityGroupFormat = "https://management.core.windows.net/{0}/affinitygroups";
|
---|
69 | public const string URICertificateFormat = "https://management.core.windows.net/{0}/services/hostedservices/{1}/certificates";
|
---|
70 | public const string URIDeploymentFormat = "https://management.core.windows.net/{0}/services/hostedservices/{1}/deploymentslots/{2}";
|
---|
71 | public const string URISpecificDeploymentFormat = "https://management.core.windows.net/{0}/services/hostedservices/{1}/deployments/{2}";
|
---|
72 | public const string URIDeploymentConfigurationFormat = "https://management.core.windows.net/{0}/services/hostedservices/{1}/deploymentslots/{2}/?comp=config";
|
---|
73 | public const string URISpecificDeploymentConfigurationFormat = "https://management.core.windows.net/{0}/services/hostedservices/{1}/deployments/{2}/?comp=config";
|
---|
74 | public const string URIChangeDeploymentStatusFormat = "https://management.core.windows.net/{0}/services/hostedservices/{1}/deployments/{2}/?comp=status";
|
---|
75 | public const string URIGetOperationStatusFormat = "https://management.core.windows.net/{0}/operations/{1}";
|
---|
76 |
|
---|
77 | #endregion
|
---|
78 |
|
---|
79 | #region Deployment
|
---|
80 |
|
---|
81 | public const string DeploymentSlotStaging = "staging";
|
---|
82 | public const string DeploymentSlotProduction = "production";
|
---|
83 | public const string DeploymentPackageUrl = "https://hivestorage.blob.core.windows.net/hiveslave/HeuristicLab.Clients.Hive.Slave.Azure.cspkg";
|
---|
84 | public const string DeploymentConfigurationUrl = "https://hivestorage.blob.core.windows.net/hiveslave/ServiceConfiguration.Cloud.cscfg";
|
---|
85 | public const string DeploymentConfigurationPath = "files/ServiceConfiguration.Cloud.cscfg";
|
---|
86 | public const string DeploymentLabel = "HeuristicLab.Hive.Slave";
|
---|
87 |
|
---|
88 | #endregion
|
---|
89 |
|
---|
90 | #region Enums
|
---|
91 |
|
---|
92 | public enum InstanceSize {
|
---|
93 | ExtraSmall = 0,
|
---|
94 | Small = 1,
|
---|
95 | Medium = 2,
|
---|
96 | Large = 4,
|
---|
97 | ExtraLarge = 8
|
---|
98 | }
|
---|
99 |
|
---|
100 | #endregion
|
---|
101 | }
|
---|
102 | }
|
---|