• SAP HANA

saphana
  1. Help Center
  2. SAP HANA
  3. User Guide (API)
  4. Creating a HANA ECS
  5. Creating a NIC (Port)
  6. API Scheduling Application Mode

API Scheduling Application Mode

Parameter Description

[1] port parameters

Attribute

Type

CRUD

Default Value

Restriction

Description

id

Uuid-Str

R

Automatically generated

N/A

Specifies the port ID.

name

String (255)

CRU

Empty

N/A

Specifies the port name.

network_id

Uuid-Str

CR

N/A

ID of the network where the port is located

Specifies the ID of the network to which the port belongs.

admin_state_up

Bool

CRU

True

True or false

Specifies an administrative status.

The value can only be True.

mac_address

String (32)

CR

Automatically generated

Valid MAC address

Specifies the port MAC address. For example, "mac_address": "fa:16:3e:9e:ff:55".

This value can only be assigned dynamically by the system.

fixed_ips

List (fixed_ips)

CRU

Automatically generated from the address pool

A fixed IP address only configured to one port

Specifies the port IP address. For details, see the fixed_ips table. For example, "fixed_ips": [{"subnet_id": "4dc70db6-cb7f-4200-9790-a6a910776bba", "ip_address": "192.169.25.79"}].

A port supports only one fixed IP address that cannot be changed.

device_id

String (255)

CRUD

Empty

N/A

Specifies a device ID.

This value is automatically maintained by the system and cannot be set and updated manually. The port with this field that is not empty cannot be deleted.

device_owner

String (255)

CRUD

Empty

N/A

Specifies the DHCP, router or Nova to which a device belongs.

This value is automatically maintained by the system and cannot be set and updated manually. The port with this field that is not empty cannot be deleted.

tenant_id

String (255)

CR

N/A

N/A

Indicates the tenant ID. Only the administrator can specify the tenant_id of other tenants.

status

String (16)

R

N/A

ACTIVE, BUILD, and DOWN

Indicates the port status.

The status of an SAP HANA SR-IOV ECS port is always DOWN.

security_groups

List (String)

CRUD

N/A

UUID of SG

Specifies the UUID of a security group. For example, "security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"]. This is an extended attribute.

One port supports only one security group. A security group must be configured when an ECS is created without special requirements.

allowed_address_pairs

List (allow_address_pair)

CRU

N/A

N/A

Specifies the IP and MAC address pair. For details, see the allow_address_pair parameters table. This is an extended attribute.

The IP address cannot be 0.0.0.0.

extra_dhcp_opts

List (extra_dhcp_opt)

CRU

N/A

N/A

Specifies the extended DHCP option. This is an extended attribute.

binding:vif_type

String (64)

R

N/A

N/A

Specifies the port virtual interface (VIF) type, such as ovs or hw_veb. This is an extended attribute.

This parameter is available only to administrators.

binding:vif_details

Dict

R

N/A

N/A

Specifies the VIF details. For example, ovs_hybrid_plug indicates the OVS and Bridge hybrid mode.

This parameter is available only to administrators.

binding:host_id

String (255)

R

Empty

N/A

Specifies the Host ID. This is an extended attribute.

This parameter is available only to administrators.

binding:profile

Dict

R

Empty

N/A

Specifies the user-defined settings. This is an extended attribute.

This parameter is available only to administrators.

binding:vnic_type

String (64)

R

Normal

Normal or direct

Specifies the type of the bound vNIC.

Normal: softswitch

Direct: SR-IOV (disabled)

[2] fixed_ip parameters

Attribute

Type

CRUD

Default Value

Restriction

Description

subnet_id

Uuid-Str

CRU

Automatically generated

ID of the subnet where the port is located

Indicates the ID of the subnet to which the port belongs.

This parameter cannot be updated.

ip_address

String (64)

CRU

Automatically generated

Valid IP address

Indicates the port IP address.

This parameter cannot be updated.

[3] allow_address_pair parameters

Attribute

Type

CRUD

Default Value

Restriction

Description

ip_address

String (64)

CRU

None

Cannot be empty

Specifies the IP address.

This parameter cannot be 0.0.0.0.

mac_address

String (32)

CRU

None

N/A

Indicates the MAC address.

[4] extra_dhcp_opt parameters

Attribute

Type

CRUD

Default Value

Restriction

Description

opt_name

String (64)

CRU

None

N/A

Indicates the option name.

opt_value

String (255)

CRU

None

N/A

Indicates the option value.

API Format

Method

URI

Description

POST

/v2.0/ports

Creates ports.

Alias of the interface for creating ports: /v2.0/ports.json. This calling mode can only be used in OpenStack Client.

Request Parameters

Parameter

Type

Mandatory or Not

Description

ports

Dict

Yes

Indicates the port information.

A security group must be configured to create ports in a scenario without special requirements.

Response Parameters

Parameter

Type

Mandatory or Not

Description

ports

Dict

Yes

Indicates the port information.

Request Example

POST /v2.0/ports
{
"port": {
    "admin_state_up": true, 
    "fixed_ips": [
      {
         "ip_address": "10.1.0.150", 
         "subnet_id": "b3ac1347-63f2-4e82-b853-3d86416a0db5"
      }
     ], 
   "security_groups": [
        "ef69bc60-2f4b-4f97-b95b-e3b68df0c0b2"
     ],
     "name": "test", 
     "network_id": "a54e1b19-ce78-4b7e-b28b-d2d716cdc161", 
     "tenant_id": "6c9298ec8c874f7f99688489ab65f90e"
    }
}

Response Example

{
   "port": {
      "admin_state_up": true, 
      "allowed_address_pairs": [], 
      "binding:host_id": "az3.dc1", 
      "binding:profile": {}, 
      "binding:vif_details": {
        "ovs_hybrid_plug": true, 
        "port_filter": true
      }, 
      "binding:vif_type": "ovs", 
      "binding:vnic_type": "normal", 
      "device_id": "", 
      "device_owner": "compute:az3.dc1", 
      "extra_dhcp_opts": [], 
      "fixed_ips": [
        {
            "ip_address": "10.1.0.150", 
            "subnet_id": "b3ac1347-63f2-4e82-b853-3d86416a0db5"
        }
     ], 
    "id": "7a9a954a-eb41-4954-a300-11ab17a361a2", 
    "mac_address": "fa:16:3e:7f:60:cb", 
    "name": "test", 
    "network_id": "a54e1b19-ce78-4b7e-b28b-d2d716cdc161", 
    "security_groups": [
      "ef69bc60-2f4b-4f97-b95b-e3b68df0c0b2"
    ], 
    "status": "DOWN", 
    "tenant_id": "6c9298ec8c874f7f99688489ab65f90e"
  }
}

Considerations:

The port created can be configured as a NIC for provisioning an ECS and can be added to the ECS after the ECS is provisioned.

When an ECS is provisioned, only one port can be configured as the primary NIC. When configuring a port, you cannot configure the security group to the disabled state. Otherwise, it may cause exceptions to the ECS.

In cluster scenario, you must configure a secondary (high-performance) NIC on a memory-optimized ECS and cancel the security group configuration to ensure that the performance of the network in the cluster connected by the secondary NIC meets network requirement. The parameter to be set is listed in the following table.

When creating a port, you need to configure additional parameters to support special configurations and configure the security group to the disabled state. The parameter to be set is shown in the following table.

Attribute

Type

CRUD

Default Value

Restriction

Description

binding:profile

Dict

R

Empty

N/A

Specifies the user-defined settings. This is an extended attribute.

When configuring the preceding parameters, configure the specified security group. Do not set disable_security_groups to true.

You need to configure a maximum transmission unit (MTU) to support the maximum frame transmission. The parameter to be set is shown in the following table.

Attribute

Type

CRUD

Default Value

Restriction

Description

extra_dhcp_opts

List (extra_dhcp_opt)

CRU

N/A

N/A

Specifies the extended DHCP option. This is an extended attribute.

extra_dhcp_opt parameters

Attribute

Type

CRUD

Default Value

Restriction

Description

opt_name

String (64)

CRU

None

N/A

Indicates the option name.

opt_value

String (255)

CRU

None

N/A

Indicates the option value.

The key-value pair to be set is shown in the following example:

"extra_dhcp_opts": [ {"opt_name": "26",
         "opt_value":"8888"}
]

The specified configuration option name is 26, and the option value is 8888.

A port created using the preceding configurations is shown in the following example:

{
   "port": {
     "admin_state_up": true,
      "fixed_ips": [
       {
         "ip_address": "10.1.0.150", 
         "subnet_id": "b3ac1347-63f2-4e82-b853-3d86416a0db5"
       }
     ], 
      "name": "test", 
      "network_id": "a54e1b19-ce78-4b7e-b28b-d2d716cdc161", 
      "tenant_id": "6c9298ec8c874f7f99688489ab65f90e",
      "extra_dhcp_opts": [
          {"opt_name": "26",
           "opt_value":"8888"
           }],
      "binding:profile": {
          "disable_security_groups":true
           }
      }
}