Friday, 24 April 2015

Using the MCP 2.0 commands for PowerShell

To back the launch of the NA9 MCP2.0 functionality, we have extended the PowerShell commands to have MCP 2.0 commands.
New-CaasNetworkDomain
New-CaasVlan
Get-CaasVlan
Get-CaasNetworkDomain
New-CaasServerOnNetworkDomain


https://community.opsourcecloud.net/Browse.jsp?id=5b71bb9ed81101d3222a0182b91cb986

To provision a Network Domain.

PS C:\> New-CaasNetworkDomain -Location "NA9" -Name "My test domain" -Description "the test domain" -Type Essentials


operation    : DEPLOY_NETWORK_DOMAIN
responseCode : IN_PROGRESS
message      : Request to deploy Network Domain 'My test domain' has been accepted and is being processed.
info         : {networkDomainId}
warning      :
error        :

requestId    : na/2015-04-25T01:25:21.614-04:00/ae7f0d6b-e522-425f-b744-2628885bdff8


To get the network domains in your MCP 2.0 datacenters

PS C:\> Get-CaasNetworkDomain


name            : My test domain
description     : the test domain
type            : ESSENTIALS
snatIpv4Address : 168.128.2.48
createTime      : 4/25/2015 5:25:21 AM
state           : NORMAL
progress        :
id              : 0481c6ef-d5e5-454f-a45d-096d8b59b104
datacenterId    : NA9

You can create a VLAN in your MCP 2.0 datacenters.

PS C:\> New-CaasVlan -NetworkDomainId "0481c6ef-d5e5-454f-a45d-096d8b59b104" -Name "Test VLAN" -Description "My first VLAN" -PrivateIpv4Ba
seAddress "192.168.100.0"


operation    : DEPLOY_VLAN
responseCode : IN_PROGRESS
message      : Request to deploy VLAN 'Test VLAN' has been accepted and is being processed.
info         : {vlanId}
warning      :
error        :
requestId    : na/2015-04-25T01:26:52.721-04:00/b99ddd00-8dfd-4d00-9bf5-99e235efe4af

There is a new command to see the VLANs provisioned in your MCP 2.0 datacenters.

PS C:\>Get-CaasVlan


networkDomain      : DD.CBU.Compute.Api.Contracts.Network20.VlanTypeNetworkDomain
name               : Test VLAN
description        : My first VLAN
privateIpv4Range   : DD.CBU.Compute.Api.Contracts.Network20.IpRangeCidrType
ipv4GatewayAddress : 192.168.100.1
ipv6Range          : DD.CBU.Compute.Api.Contracts.Network20.IpRangeCidrType
ipv6GatewayAddress : 2607:f480:111:1167:0:0:0:1
createTime         : 4/25/2015 5:26:52 AM
state              : PENDING_ADD
progress           : DD.CBU.Compute.Api.Contracts.Network20.ProgressType
id                 : a19c37d6-1a35-4313-810b-f0c59de73000
datacenterId       : NA9

And of course, your existing functionality will still work.

1 comment: