NSX-T Plugin

Cloudify NSX-T Plugin enables users create NSX-T Resources in NSX-T manager.

Release History

See releases.

Authentication with NSX-T

Each node template, has a client_config property which stores your account credentials.

The client_config consists of the following:

Common Properties

Openstack Plugin node types have these common properties, except where noted:

Properties

Common Runtime Properties

Node instances of any of the types defined in this plugin are set with the following runtime properties during the cloudify.interfaces.lifecycle.create operation:

Currently, the plugin provides the following features for interacting with NSX-T API: 1. Segment: - Create Segment - Delete Segment

  1. DHCP Server Config:

    • Create DHCP Server Config
    • Delete DHCP Server Config
  2. Tier1 Gateway:

    • Create Tier1 Gateway
    • Delete Tier1 Gateway
  3. Virtual Machine:

    • List Virtual Machines
    • List All Virtual Network Interface Associated with VM
  4. DHCP Static Binding

    • Create DHCP Static Binding
    • Delete DHCP Static Binding

Node Types

cloudify.nodes.nsx-t.DhcpServerConfig

This node type refers to a DHCP Server Config.

Resource Config

Properties

DHCP Server Config Example

  dhcb_server_config:
    type: cloudify.nodes.nsx-t.DhcpServerConfig
    properties:
      client_config:
        host: { get_input: host }
        port: { get_input: port }
        username: { get_input: username }
        password: { get_input: password }
      resource_config:
        id: test_dhcp_server
        display_name: Test DHCP Server
        description: Test DHCP Server Config
        edge_cluster_path: /infra/sites/default/enforcement-points/default/edge-clusters/272cfe43-ebcc-49bb-8471-62a261ed8931
        tags:
         - scope: Name
           tag: Test DHCP

cloudify.nodes.nsx-t.Segment

This node type refers to a Segment.

Relationships * cloudify.relationships.nsx-t.segment_connected_to_dhcp_server_config: * cloudify.nodes.nsx-t.DhcpServerConfig: Depend on DHCP Server Config

Segment Example

  segment:
    type: cloudify.nodes.nsx-t.Segment
    properties:
      client_config:
        host: { get_input: host }
        port: { get_input: port }
        username: { get_input: username }
        password: { get_input: password }
      resource_config:
          id: test_segment
          display_name: test-segment
          description: Test Segment Config
          transport_zone_path: /infra/sites/default/enforcement-points/default/transport-zones/1b3a2f36-bfd1-443e-a0f6-4de01abc963e
          connectivity_path: /infra/tier-1s/test-tier1
          dhcp_config_path: /infra/dhcp-server-configs/test_dhcp_server
          subnet:
            ip_v4_config:
              dhcp_config:
                server_address: 192.168.11.11/24
                lease_time: 86400
                resource_type: SegmentDhcpV4Config
              gateway_address: 192.168.11.12/24
              dhcp_ranges:
                - "192.168.11.100-192.168.11.160"
            ip_v6_config:
              dhcp_config:
                server_address: fc7e:f206:db42::6/48
                lease_time: 86400
                resource_type: SegmentDhcpV6Config
              gateway_address: fc7e:f206:db42::2/48   
    relationships:
      - type: cloudify.relationships.nsx-t.segment_connected_to_dhcp_server_config
        target: dhcb_server_config

cloudify.nodes.nsx-t.Tier1

This node type refers to a Tier1 Gateway.

Resource Config

Tier1 Example

  tier1:
    type: cloudify.nodes.nsx-t.Tier1
    properties:
      client_config:
        host: { get_input: host }
        port: { get_input: port }
        username: { get_input: username }
        password: { get_input: password }
      resource_config:
          id: test_tier1
          display_name: Test Tier1 Router
          description: Test Tier1 Router
          tier0_path:{ get_input: tier0_path }

cloudify.types.nsx-t.inventory.VirtualMachine

This node type refers to a Virtual Machine resource.

Resource Config * vm_id: String. Not required. External VM ID. * vm_name: String. Not required. The Name of VM. * network_id: String. Required. The network id to get ips from.

Runtime Properties

Beside the common runtime properties, the VirtualMachine node type also expose the following two runtime properties: * networks: Dict. Dictionary of all virtual network interfaces attached to the current vm.

```json
{
   "Network adapter 1":{
      "device_key":"4000",
      "device_name":"Network adapter 1",
      "external_id":"502a627a-2b5a-0f27-ace9-44a9b66d9692-4000",
      "host_id":"55174c3a-412e-4083-b2f1-cf2cd265ef5b",
      "ip_address_info":[
         {
            "ip_addresses":[
               "192.168.11.100",
               "2001:ab8::250:56ff:feaa:9160",
               "fe80::250:56ff:feaa:9160"
            ],
            "source":"VM_TOOLS"
         }
      ],
      "lport_attachment_id":"3e660c66-7a8e-45a4-8c82-ffe3afcc7de2",
      "mac_address":"00:50:56:aa:91:60",
      "owner_vm_id":"502a627a-2b5a-0f27-ace9-44a9b66d9692",
      "owner_vm_type":"REGULAR",
      "vm_local_id_on_host":"49",
      "_last_sync_time":1598369175580,
      "display_name":"Network adapter 1",
      "resource_type":"VirtualNetworkInterface",
      "ipv4_addresses":[
         "192.168.11.100"
      ],
      "ipv6_addresses":[
         "2001:ab8::250:56ff:feaa:9160",
         "fe80::250:56ff:feaa:9160"
      ]
   }
}
```

VirtualMachine Example

  virtual_machine_inventory:
    type: cloudify.nodes.nsx-t.inventory.VirtualMachine
    properties:
      client_config:
        host: { get_input: host }
        port: { get_input: port }
        username: { get_input: username }
        password: { get_input: password }
      resource_config:
        vm_name: { get_attribute: [ host, name ] }
        network_id: { get_attribute: [ segment, id ] }
    relationships:
      - type: cloudify.relationships.nsx-t.inventory_connected_to_server
        target: host
      - type: cloudify.relationships.depends_on
        target: segment

Relationships

We support a relationship called cloudify.relationships.server_connected_to_segment that support dhcp static binding where a static ip attached to the server that has the following operations:

Relationships Example

  host-node:
    type: cloudify.vsphere.nodes.Server
    properties:
      client_config:
        host: { get_input: host }
        port: { get_input: port }
        username: { get_input: username }
        password: { get_input: password }
      agent_config:
        install_method: none
      allowed_clusters: { get_input: allowed_clusters }
      server:
        name: { get_input: server_name }
        template: { get_input: template }
        cpus: 1
        memory: 1024
      networking:
        connect_networks:
          - name: { get_attribute: [ segment, name ] }
            nsx_t_switch: { get_input: nsx_t_switch }
            use_dhcp: true
    relationships:
      - type: cloudify.relationships.server_connected_to_segment
        target: segment
        target_interfaces:
          cloudify.interfaces.relationship_lifecycle:
            preconfigure:
              inputs:
                network_unique_id: { get_attribute: [ segment, unique_id ] }
                ip_v4_address: { get_input: ip_address }