← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1423747] [NEW] neutron port-create error message is not helpful

 

Public bug reported:

nova-manage version: 2015.1

Issue: Error message for "neutron port-create" failure is not helpful.

ubuntu@trusty1:~/devstack$ neutron help port-create
usage: neutron port-create [-h] [-f {html,json,shell,table,value,yaml}]
                           [-c COLUMN] [--max-width <integer>]
                           [--prefix PREFIX] [--request-format {json,xml}]
                           [--tenant-id TENANT_ID] [--name NAME]
                           [--admin-state-down] [--mac-address MAC_ADDRESS]
                           [--device-id DEVICE_ID]
                           [--fixed-ip subnet_id=SUBNET,ip_address=IP_ADDR]
                           [--security-group SECURITY_GROUP | --no-security-groups]
                           [--extra-dhcp-opt EXTRA_DHCP_OPTS]
                           NETWORK

Create a port for a given tenant.

positional arguments:
  NETWORK               Network ID or name this port belongs to.

optional arguments:
  -h, --help            show this help message and exit
  --request-format {json,xml}
                        The XML or JSON request format.
  --tenant-id TENANT_ID
                        The owner tenant ID.
  --name NAME           Name of this port.
  --admin-state-down    Set admin state up to false.
  --mac-address MAC_ADDRESS
                        MAC address of this port.
  --device-id DEVICE_ID
                        Device ID of this port.
  --fixed-ip subnet_id=SUBNET,ip_address=IP_ADDR
                        Desired IP and/or subnet for this port:
                        subnet_id=<name_or_id>,ip_address=<ip>.You can repeat
                        this option.
  --security-group SECURITY_GROUP
                        Security group associated with the port. You can
                        repeat this option.
  --no-security-groups  Associate no security groups with the port.
  --extra-dhcp-opt EXTRA_DHCP_OPTS
                        Extra dhcp options to be assigned to this port:
                        opt_name=<dhcp_option_name>,opt_value=<value>. You can
                        repeat this option.

output formatters:
  output formatter options

  -f {html,json,shell,table,value,yaml}, --format {html,json,shell,table,value,yaml}
                        the output format, defaults to table
  -c COLUMN, --column COLUMN
                        specify the column(s) to include, can be repeated

table formatter:
  --max-width <integer>
                        Maximum display width, 0 to disable

shell formatter:
  a format a UNIX shell can parse (variable="value")

  --prefix PREFIX       add a prefix to all variable names


Note the optional argument [--fixed-ip subnet_id=SUBNET,ip_address=IP_ADDR]

I accidentally omit "ip_address=" when using this option: --fixed-ip
10.0.0.4

The correct syntax should be: --fixed-ip ip_address=10.0.0.4

ubuntu@trusty1:~/devstack$ neutron port-create --fixed-ip 10.0.0.4 private
dictionary update sequence element #0 has length 1; 2 is required       <<<<<< ERROR message not helpful

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1423747

Title:
  neutron port-create error message is not helpful

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  nova-manage version: 2015.1

  Issue: Error message for "neutron port-create" failure is not helpful.

  ubuntu@trusty1:~/devstack$ neutron help port-create
  usage: neutron port-create [-h] [-f {html,json,shell,table,value,yaml}]
                             [-c COLUMN] [--max-width <integer>]
                             [--prefix PREFIX] [--request-format {json,xml}]
                             [--tenant-id TENANT_ID] [--name NAME]
                             [--admin-state-down] [--mac-address MAC_ADDRESS]
                             [--device-id DEVICE_ID]
                             [--fixed-ip subnet_id=SUBNET,ip_address=IP_ADDR]
                             [--security-group SECURITY_GROUP | --no-security-groups]
                             [--extra-dhcp-opt EXTRA_DHCP_OPTS]
                             NETWORK

  Create a port for a given tenant.

  positional arguments:
    NETWORK               Network ID or name this port belongs to.

  optional arguments:
    -h, --help            show this help message and exit
    --request-format {json,xml}
                          The XML or JSON request format.
    --tenant-id TENANT_ID
                          The owner tenant ID.
    --name NAME           Name of this port.
    --admin-state-down    Set admin state up to false.
    --mac-address MAC_ADDRESS
                          MAC address of this port.
    --device-id DEVICE_ID
                          Device ID of this port.
    --fixed-ip subnet_id=SUBNET,ip_address=IP_ADDR
                          Desired IP and/or subnet for this port:
                          subnet_id=<name_or_id>,ip_address=<ip>.You can repeat
                          this option.
    --security-group SECURITY_GROUP
                          Security group associated with the port. You can
                          repeat this option.
    --no-security-groups  Associate no security groups with the port.
    --extra-dhcp-opt EXTRA_DHCP_OPTS
                          Extra dhcp options to be assigned to this port:
                          opt_name=<dhcp_option_name>,opt_value=<value>. You can
                          repeat this option.

  output formatters:
    output formatter options

    -f {html,json,shell,table,value,yaml}, --format {html,json,shell,table,value,yaml}
                          the output format, defaults to table
    -c COLUMN, --column COLUMN
                          specify the column(s) to include, can be repeated

  table formatter:
    --max-width <integer>
                          Maximum display width, 0 to disable

  shell formatter:
    a format a UNIX shell can parse (variable="value")

    --prefix PREFIX       add a prefix to all variable names

  
  Note the optional argument [--fixed-ip subnet_id=SUBNET,ip_address=IP_ADDR]

  I accidentally omit "ip_address=" when using this option: --fixed-ip
  10.0.0.4

  The correct syntax should be: --fixed-ip ip_address=10.0.0.4

  ubuntu@trusty1:~/devstack$ neutron port-create --fixed-ip 10.0.0.4 private
  dictionary update sequence element #0 has length 1; 2 is required       <<<<<< ERROR message not helpful

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1423747/+subscriptions


Follow ups

References