diff --git a/examples/blueprint.yaml b/examples/blueprint.yaml index 405fdd2..48a9359 100644 --- a/examples/blueprint.yaml +++ b/examples/blueprint.yaml @@ -49,8 +49,13 @@ inputs: type: string default: Cluster - ip_address: + wait_ip: + type: boolean + default: true + + ip_v4_address: type: string + default: '192.168.11.95' dsl_definitions: @@ -103,6 +108,7 @@ node_templates: agent_config: install_method: none allowed_clusters: { get_input: allowed_clusters } + wait_ip: { get_input: wait_ip } server: name: { get_input: server_name } template: { get_input: template } @@ -121,7 +127,8 @@ node_templates: preconfigure: inputs: network_unique_id: { get_attribute: [ segment, unique_id ] } - ip_v4_address: { get_input: ip_address } + ip_v4_address: { get_input: ip_v4_address } + virtual_machine_inventory: type: cloudify.nodes.nsx-t.inventory.VirtualMachine diff --git a/nsx_t_plugin/virtual_machine/virtual_machine.py b/nsx_t_plugin/virtual_machine/virtual_machine.py index 42ef865..1035024 100644 --- a/nsx_t_plugin/virtual_machine/virtual_machine.py +++ b/nsx_t_plugin/virtual_machine/virtual_machine.py @@ -75,8 +75,9 @@ def _populate_networks_for_virtual_machine( ports = _lookup_segment_ports(client_config, network_id) if not ports: raise OperationRetry( - 'Network {0} is still not connected to any device'.format( - network_id)) + 'Network {0} is not connected to any virtual machine'.format( + network_id) + ) else: networks_obj = {} networks_obj['networks'] = {} @@ -88,14 +89,14 @@ def _populate_networks_for_virtual_machine( networks_obj['networks'][network['display_name']] = network if not target_network: - raise NonRecoverableError( - 'The selected network {0} is not ' + raise OperationRetry( + 'The selected network {0} still not ' 'attached to target virtual machine {1}' ''.format(network_id, owner_vm_id) ) - - ctx.instance.runtime_properties[network_id] = target_network - ctx.instance.runtime_properties['networks'] = networks_obj + else: + ctx.instance.runtime_properties[network_id] = target_network + ctx.instance.runtime_properties['networks'] = networks_obj @with_nsx_t_client(VirtualMachine) diff --git a/plugin.yaml b/plugin.yaml index ace5b51..8fbb189 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -16,8 +16,8 @@ plugins: nsx-t: package_name: cloudify-nsx-t-plugin - source: https://github.com/Cloudify-PS/cloudify-nsx-t-plugin/archive/0.3.1.zip - package_version: '0.3.1' + source: https://github.com/Cloudify-PS/cloudify-nsx-t-plugin/archive/0.3.2.zip + package_version: '0.3.2' executor: central_deployment_agent dsl_definitions: @@ -102,7 +102,7 @@ data_types: DHCP lease time in seconds. When specified, this property overwrites lease time configured DHCP server config. server_address: - type: list + type: string required: false description: > IP address of the DHCP server in CIDR format. diff --git a/setup.py b/setup.py index 0c5f286..de2a39d 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( name='cloudify-nsx-t-plugin', - version='0.3.1', + version='0.3.2', author='Cloudify Platform Ltd.', author_email='hello@cloudify.co', license='LICENSE',