C# Class Microsoft.WindowsAzure.Management.CloudService.Model.AzureService

Class that encapsulates all of the info about a service, to which we can add roles. This is all in memory, so no disk operations occur.
Show file Open project: OctopusDeploy/azure-sdk-tools Class Usage Examples

Public Methods

Method Description
AddDjangoWebRole ( string name = null, int instanceCount = 1 ) : RoleInfo
AddRoleRuntime ( Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths, string roleName, string runtimeType, string runtimeVersion, string manifest = null ) : void

Add the specified runtime to a role, checking that the runtime and version are currently available int he cloud

AddWebRole ( string scaffolding, string name = null, int instanceCount = 1 ) : RoleInfo
AddWorkerRole ( string Scaffolding, string name = null, int instanceCount = 1 ) : RoleInfo
AzureService ( ) : System
AzureService ( string rootPath, string scaffoldingPath ) : System
AzureService ( string serviceParentDirectory, string name, string scaffoldingPath ) : System
ChangeRolePermissions ( RoleInfo role ) : void
ChangeServiceName ( string newName, Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths ) : void
GenerateScaffolding ( string scaffolding, string roleName, object>.Dictionary parameters ) : void

Generates scaffolding for role.

GetCloudRuntimes ( Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths, string manifest ) : CloudRuntimeCollection

Retrieve currently available cloud runtimes

SetRoleInstances ( Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths, string roleName, int instances ) : void

Sets the role instance count

SetRoleVMSize ( Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths, string roleName, string VMSize ) : void

Sets the role VMSize

Private Methods

Method Description
AddPythonRoleCore ( RoleInfo role, RoleType type ) : void

Adds the given role to both config files and the service def.

AddRoleCore ( string scaffolding, RoleInfo role ) : void

Adds the given role to both config files and the service def.

ConfigureNewService ( Microsoft.WindowsAzure.Management.CloudService.Model.ServiceComponents components, Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths, string serviceName ) : void
CreateDefaultParameters ( RoleInfo role ) : object>.Dictionary
CreateNewService ( string serviceRootPath, string serviceName ) : void
CreatePackage ( DevEnv type, string &standardOutput, string &standardError ) : void
GetRoleName ( string name, string defaultName, IEnumerable existingNames ) : string

Creates a role name, ensuring it doesn't already exist. If null is passed in, a number will be appended to the defaultRoleName.

SetScaffolding ( string scaffoldingFolderDirectory ) : void
StartEmulator ( bool launch, string &standardOutput, string &standardError ) : void
StopEmulator ( string &standardOutput, string &standardError ) : void

Method Details

AddDjangoWebRole() public method

public AddDjangoWebRole ( string name = null, int instanceCount = 1 ) : RoleInfo
name string
instanceCount int
return RoleInfo

AddRoleRuntime() public method

Add the specified runtime to a role, checking that the runtime and version are currently available int he cloud
public AddRoleRuntime ( Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths, string roleName, string runtimeType, string runtimeVersion, string manifest = null ) : void
paths Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo service path info
roleName string Name of the role to change
runtimeType string The runtime identifier
runtimeVersion string The runtime version
manifest string Location fo the manifest file, default is the cloud manifest
return void

AddWebRole() public method

public AddWebRole ( string scaffolding, string name = null, int instanceCount = 1 ) : RoleInfo
scaffolding string
name string
instanceCount int
return RoleInfo

AddWorkerRole() public method

public AddWorkerRole ( string Scaffolding, string name = null, int instanceCount = 1 ) : RoleInfo
Scaffolding string
name string
instanceCount int
return RoleInfo

AzureService() public method

public AzureService ( ) : System
return System

AzureService() public method

public AzureService ( string rootPath, string scaffoldingPath ) : System
rootPath string
scaffoldingPath string
return System

AzureService() public method

public AzureService ( string serviceParentDirectory, string name, string scaffoldingPath ) : System
serviceParentDirectory string
name string
scaffoldingPath string
return System

ChangeRolePermissions() public method

public ChangeRolePermissions ( RoleInfo role ) : void
role RoleInfo
return void

ChangeServiceName() public method

public ChangeServiceName ( string newName, Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths ) : void
newName string
paths Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo
return void

GenerateScaffolding() public method

Generates scaffolding for role.
public GenerateScaffolding ( string scaffolding, string roleName, object>.Dictionary parameters ) : void
scaffolding string The relative scaffolding source path
roleName string The role name
parameters object>.Dictionary The rule parameters
return void

GetCloudRuntimes() public method

Retrieve currently available cloud runtimes
public GetCloudRuntimes ( Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths, string manifest ) : CloudRuntimeCollection
paths Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo service path info
manifest string The manifest to use to get current runtime info - default is the cloud manifest
return CloudRuntimeCollection

SetRoleInstances() public method

Sets the role instance count
public SetRoleInstances ( Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths, string roleName, int instances ) : void
paths Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo The service paths
roleName string The name of the role to change its instance count
instances int
return void

SetRoleVMSize() public method

Sets the role VMSize
public SetRoleVMSize ( Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths, string roleName, string VMSize ) : void
paths Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo The service paths
roleName string The name of the role to change its vm size
VMSize string The new role vm size
return void