diff --git a/meta/io.murano/Classes/resources/ExistingNeutronNetwork.yaml b/meta/io.murano/Classes/resources/ExistingNeutronNetwork.yaml index 8683508e..0a84a0e3 100644 --- a/meta/io.murano/Classes/resources/ExistingNeutronNetwork.yaml +++ b/meta/io.murano/Classes/resources/ExistingNeutronNetwork.yaml @@ -93,6 +93,7 @@ Workflow: Contract: - $.class(std:SharedIp) Body: + - $.deploy() - $fipName: null - $floatingIpNeRef: null - If: $assignFloatingIp @@ -109,3 +110,15 @@ Workflow: floatingIpResourceName => $fipName, floatingIpNeRef => $floatingIpNeRef ) + + + describe: + Body: + - $.deploy() + - Return: + provider: Neutron + netRef: $._internalNetworkId + subnetRef: $._internalSubnetworkId + floatingIpNeRef: $._externalNetworkId + + diff --git a/meta/io.murano/Classes/resources/Network.yaml b/meta/io.murano/Classes/resources/Network.yaml index bd79f322..061669ae 100644 --- a/meta/io.murano/Classes/resources/Network.yaml +++ b/meta/io.murano/Classes/resources/Network.yaml @@ -23,3 +23,5 @@ Methods: Arguments: - environment: Contract: $.class(std:Environment).notNull() + + describe: \ No newline at end of file diff --git a/meta/io.murano/Classes/resources/NeutronNetwork.yaml b/meta/io.murano/Classes/resources/NeutronNetwork.yaml index 962997a2..06434b9d 100644 --- a/meta/io.murano/Classes/resources/NeutronNetwork.yaml +++ b/meta/io.murano/Classes/resources/NeutronNetwork.yaml @@ -41,6 +41,7 @@ Methods: - $._environment: $.find(std:Environment).require() - $._netExplorer: new(sys:NetworkExplorer) + deploy: Body: - If: not $.getAttr(deployed, false) @@ -66,6 +67,7 @@ Methods: - $._environment.stack.push() - $.setAttr(deployed, true) + _createNetwork: Body: - Return: @@ -75,6 +77,7 @@ Methods: properties: name: format('{0}-{1}', $.name, $.id()) + _createSubnet: Body: - Return: @@ -87,6 +90,7 @@ Methods: dns_nameservers: [ $.dnsNameserver ] cidr: $.subnetCidr + _createRouterInterface: Body: - Return: @@ -97,6 +101,7 @@ Methods: router_id: $.externalRouterId subnet: { get_resource: $._getSubnetName() } + joinInstance: Arguments: - instance: @@ -109,6 +114,7 @@ Methods: Contract: - $.class(std:SharedIp) Body: + - $.deploy() - $netRef: { get_resource: $._getNetworkName() } - $subnetRef: { get_resource: $._getSubnetName() } - $extNetId: null @@ -140,18 +146,34 @@ Methods: - Return: $result + + describe: + Body: + - $.deploy() + - Return: + provider: Neutron + netRef: + get_resource: $._getNetworkName() + subnetRef: + get_resource: $._getSubnetName() + floatingIpNeRef: $._getExternalNetId() + + _getRouterInterfaceName: Body: Return: format('ri-{0}', $.id()) + _getNetworkName: Body: Return: format('network-{0}', $.id()) + _getSubnetName: Body: Return: format('subnet-{0}', $.id()) + _getExternalNetId: Body: Return: $._netExplorer.getExternalNetworkIdForRouter($.externalRouterId) diff --git a/meta/io.murano/Classes/resources/NovaNetwork.yaml b/meta/io.murano/Classes/resources/NovaNetwork.yaml index 91c51a15..c7e23be3 100644 --- a/meta/io.murano/Classes/resources/NovaNetwork.yaml +++ b/meta/io.murano/Classes/resources/NovaNetwork.yaml @@ -49,9 +49,16 @@ Methods: get_resource: $securityGroupName instanceFipOutput: instanceFipOutput + generateSecurityGroupManager: Arguments: - environment: Contract: $.class(std:Environment).notNull() Body: - Return: new(sys:AwsSecurityGroupManager, environment => $environment) + + + describe: + Body: + - Return: + provider: NovaNetwork