osc network port create

Creates a port on a network.

To define the network in which to create the port, specify the network_id attribute in the request body.

Normal response codes: 201

Error response codes: 400, 401, 403, 404

Usage: osc network port create [OPTIONS]

Options:

  • --admin-state-up <ADMIN_STATE_UP> — The administrative state of the resource, which is up (true) or down (false). Default is true

    Possible values: true, false

  • --allowed-address-pairs <JSON> — A set of zero or more allowed address pair objects each where address pair object contains an ip_address and mac_address. While the ip_address is required, the mac_address will be taken from the port if not specified. The value of ip_address can be an IP Address or a CIDR (if supported by the underlying extension plugin). A server connected to the port can send a packet with source address which matches one of the specified allowed address pairs

  • --binding-host-id <BINDING_HOST_ID> — The ID of the host where the port resides. The default is an empty string

  • --binding-profile <key=value> — A dictionary that enables the application running on the specific host to pass and receive vif port information specific to the networking back-end. This field is only meant for machine-machine communication for compute services like Nova, Ironic or Zun to pass information to a Neutron back-end. It should not be used by multiple services concurrently or by cloud end users. The existing counterexamples (capabilities: [switchdev] for Open vSwitch hardware offload and trusted=true for Trusted Virtual Functions) are due to be cleaned up. The networking API does not define a specific format of this field. The default is an empty dictionary. If you update it with null then it is treated like {} in the response. Since the port-mac-address-override extension the device_mac_address field of the binding:profile can be used to provide the MAC address of the physical device a direct-physical port is being bound to. If provided, then the mac_address field of the port resource will be updated to the MAC from the active binding

  • --binding-vnic-type <BINDING_VNIC_TYPE> — The type of vNIC which this port should be attached to. This is used to determine which mechanism driver(s) to be used to bind the port. The valid values are normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder, smart-nic and remote-managed. What type of vNIC is actually available depends on deployments. The default is normal

    Possible values: accelerator-direct, accelerator-direct-physical, baremetal, direct, direct-physical, macvtap, normal, remote-managed, smart-nic, vdpa, virtio-forwarder

  • --description <DESCRIPTION> — A human-readable description for the resource. Default is an empty string

  • --device-id <DEVICE_ID> — The ID of the device that uses this port. For example, a server instance or a logical router

  • --device-owner <DEVICE_OWNER> — The entity type that uses this port. For example, compute:nova (server instance), network:dhcp (DHCP agent) or network:router_interface (router interface)

  • --device-profile <DEVICE_PROFILE>

  • --dns-domain <DNS_DOMAIN> — A valid DNS domain

  • --dns-name <DNS_NAME> — A valid DNS name

  • --extra-dhcp-opts <JSON> — A set of zero or more extra DHCP option pairs. An option pair consists of an option value and name

  • --fixed-ips <JSON> — The IP addresses for the port. If you would like to assign multiple IP addresses for the port, specify multiple entries in this field. Each entry consists of IP address (ip_address) and the subnet ID from which the IP address is assigned (subnet_id).

    • If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the IP address on that subnet to the port. - If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. - If you specify only an IP address, OpenStack Networking tries to allocate the IP address if the address is a valid IP for any of the subnets on the specified network.
  • --hints <key=value> — Admin-only. A dict, at the top level keyed by mechanism driver aliases (as defined in setup.cfg). To following values can be used to control Open vSwitch’s Userspace Tx packet steering feature:

    • {"openvswitch": {"other_config": {"tx-steering": "hash"}}} - {"openvswitch": {"other_config": {"tx-steering": "thread"}}}

    If omitted the default is defined by Open vSwitch. The field cannot be longer than 4095 characters.

  • --mac-address <MAC_ADDRESS> — The MAC address of the port. If unspecified, a MAC address is automatically generated

  • --name <NAME> — Human-readable name of the resource. Default is an empty string

  • --network-id <NETWORK_ID> — The ID of the attached network

  • --numa-affinity-policy <NUMA_AFFINITY_POLICY> — The port NUMA affinity policy requested during the virtual machine scheduling. Values: None, required, preferred or legacy

    Possible values: legacy, preferred, required, socket

  • --port-security-enabled <PORT_SECURITY_ENABLED> — The port security status. A valid value is enabled (true) or disabled (false). If port security is enabled for the port, security group rules and anti-spoofing rules are applied to the traffic on the port. If disabled, no such rules are applied

    Possible values: true, false

  • --propagate-uplink-status <PROPAGATE_UPLINK_STATUS> — The uplink status propagation of the port. Valid values are enabled (true) and disabled (false)

    Possible values: true, false

  • --qos-policy-id <QOS_POLICY_ID> — QoS policy associated with the port

  • --security-groups <SECURITY_GROUPS> — The IDs of security groups applied to the port

  • --tags <TAGS>

  • --tenant-id <TENANT_ID> — The ID of the project that owns the resource. Only administrative and users with advsvc role can specify a project ID other than their own. You cannot change this value through authorization policies