Merge "Adds describe method to Network implementations"

This commit is contained in:
Jenkins 2015-04-13 11:02:02 +00:00 committed by Gerrit Code Review
commit 5f545f413f
4 changed files with 44 additions and 0 deletions

View File

@ -93,6 +93,7 @@ Workflow:
Contract: Contract:
- $.class(std:SharedIp) - $.class(std:SharedIp)
Body: Body:
- $.deploy()
- $fipName: null - $fipName: null
- $floatingIpNeRef: null - $floatingIpNeRef: null
- If: $assignFloatingIp - If: $assignFloatingIp
@ -109,3 +110,15 @@ Workflow:
floatingIpResourceName => $fipName, floatingIpResourceName => $fipName,
floatingIpNeRef => $floatingIpNeRef floatingIpNeRef => $floatingIpNeRef
) )
describe:
Body:
- $.deploy()
- Return:
provider: Neutron
netRef: $._internalNetworkId
subnetRef: $._internalSubnetworkId
floatingIpNeRef: $._externalNetworkId

View File

@ -23,3 +23,5 @@ Methods:
Arguments: Arguments:
- environment: - environment:
Contract: $.class(std:Environment).notNull() Contract: $.class(std:Environment).notNull()
describe:

View File

@ -41,6 +41,7 @@ Methods:
- $._environment: $.find(std:Environment).require() - $._environment: $.find(std:Environment).require()
- $._netExplorer: new(sys:NetworkExplorer) - $._netExplorer: new(sys:NetworkExplorer)
deploy: deploy:
Body: Body:
- If: not $.getAttr(deployed, false) - If: not $.getAttr(deployed, false)
@ -66,6 +67,7 @@ Methods:
- $._environment.stack.push() - $._environment.stack.push()
- $.setAttr(deployed, true) - $.setAttr(deployed, true)
_createNetwork: _createNetwork:
Body: Body:
- Return: - Return:
@ -75,6 +77,7 @@ Methods:
properties: properties:
name: format('{0}-{1}', $.name, $.id()) name: format('{0}-{1}', $.name, $.id())
_createSubnet: _createSubnet:
Body: Body:
- Return: - Return:
@ -87,6 +90,7 @@ Methods:
dns_nameservers: [ $.dnsNameserver ] dns_nameservers: [ $.dnsNameserver ]
cidr: $.subnetCidr cidr: $.subnetCidr
_createRouterInterface: _createRouterInterface:
Body: Body:
- Return: - Return:
@ -97,6 +101,7 @@ Methods:
router_id: $.externalRouterId router_id: $.externalRouterId
subnet: { get_resource: $._getSubnetName() } subnet: { get_resource: $._getSubnetName() }
joinInstance: joinInstance:
Arguments: Arguments:
- instance: - instance:
@ -109,6 +114,7 @@ Methods:
Contract: Contract:
- $.class(std:SharedIp) - $.class(std:SharedIp)
Body: Body:
- $.deploy()
- $netRef: { get_resource: $._getNetworkName() } - $netRef: { get_resource: $._getNetworkName() }
- $subnetRef: { get_resource: $._getSubnetName() } - $subnetRef: { get_resource: $._getSubnetName() }
- $extNetId: null - $extNetId: null
@ -140,18 +146,34 @@ Methods:
- Return: $result - Return: $result
describe:
Body:
- $.deploy()
- Return:
provider: Neutron
netRef:
get_resource: $._getNetworkName()
subnetRef:
get_resource: $._getSubnetName()
floatingIpNeRef: $._getExternalNetId()
_getRouterInterfaceName: _getRouterInterfaceName:
Body: Body:
Return: format('ri-{0}', $.id()) Return: format('ri-{0}', $.id())
_getNetworkName: _getNetworkName:
Body: Body:
Return: format('network-{0}', $.id()) Return: format('network-{0}', $.id())
_getSubnetName: _getSubnetName:
Body: Body:
Return: format('subnet-{0}', $.id()) Return: format('subnet-{0}', $.id())
_getExternalNetId: _getExternalNetId:
Body: Body:
Return: $._netExplorer.getExternalNetworkIdForRouter($.externalRouterId) Return: $._netExplorer.getExternalNetworkIdForRouter($.externalRouterId)

View File

@ -49,9 +49,16 @@ Methods:
get_resource: $securityGroupName get_resource: $securityGroupName
instanceFipOutput: instanceFipOutput instanceFipOutput: instanceFipOutput
generateSecurityGroupManager: generateSecurityGroupManager:
Arguments: Arguments:
- environment: - environment:
Contract: $.class(std:Environment).notNull() Contract: $.class(std:Environment).notNull()
Body: Body:
- Return: new(sys:AwsSecurityGroupManager, environment => $environment) - Return: new(sys:AwsSecurityGroupManager, environment => $environment)
describe:
Body:
- Return:
provider: NovaNetwork