** Also affects: openstack-api-site
   Importance: Undecided
       Status: New

** Changed in: openstack-api-site
       Status: New => Confirmed

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

Title:
  "router-interface-delete port=xxx" deletes the whole port instead of
  just removing the interface

Status in neutron:
  In Progress
Status in openstack-api-site:
  Confirmed

Bug description:
  The help message of "neutron router-interface-delete" says

  "Remove an internal network interface from a router."

  =================
  Expected behavior
  =================
  neutron router-interface-add subnet=subnetx
  --> creates a port, and adds this port as interface to the router

  neutron router-interface-delete subnet=subnetx
  --> removes that interface from the router and deletes the corresponding port

  
  neutron router-interface-add port=portx
  --> adds an already existing port as interface to the router

  neutron router-interface-delete port=portx
  --> removes that interface from the router. Does NOT delete that 
corresponding port

  =============
  Actual result
  =============

  "neutron router-interface-delete subnet=subnetx" works as expected.

  BUT

  "neutron router-interface-delete port=portx" does not only remove the
  interface from the router, it also deletes the whole port!

  
  =================
  Proposed solution
  =================

  Either
  #1 Extend the API description to refelct this behavior

  
  Or
  #2 Change the behavior in the special case to NOT delete the port, but only 
remove the interface from the router

  
  ==================
  Steps to reproduce
  ==================

  # neutron router-interface-delete -h
  usage: neutron router-interface-delete [-h] [--request-format {json}]
                                         ROUTER INTERFACE

  Remove an internal network interface from a router.

  positional arguments:
    ROUTER                ID or name of the router.
    INTERFACE             The format is "SUBNET|subnet=SUBNET|port=PORT". Either
                          a subnet or port must be specified. Both ID and name
                          are accepted as SUBNET or PORT. Note that "subnet="
                          can be omitted when specifying a subnet.


  [root@tecs218 ~(keystone_admin)]# neutron router-create test
  Created a new router:
  +-----------------------+--------------------------------------+
  | Field                 | Value                                |
  +-----------------------+--------------------------------------+
  | admin_state_up        | True                                 |
  | external_gateway_info |                                      |
  | id                    | 4039bd93-b183-4250-af0f-e9739ac1a19a |
  | name                  | test                                 |
  | status                | ACTIVE                               |
  | tenant_id             | 0d76aad1dda94f83a2a0a55c04547434     |
  +-----------------------+--------------------------------------+
  [root@tecs218 ~(keystone_admin)]# neutron router-interface-add test  
port=90e0abe1-852b-4cfe-afd9-2bd31a42c279
  Added interface 90e0abe1-852b-4cfe-afd9-2bd31a42c279 to router test.
  [root@tecs218 ~(keystone_admin)]# neutron router-interface-add test  
port=90e0abe1-852b-4cfe-afd9-2bd31a42c27^C
  [root@tecs218 ~(keystone_admin)]# neutron port-show 
90e0abe1-852b-4cfe-afd9-2bd31a42c279
  
+---------------------+-----------------------------------------------------------------------------------+
  | Field               | Value                                                 
                            |
  
+---------------------+-----------------------------------------------------------------------------------+
  | admin_state_up      | True                                                  
                            |
  | bandwidth           | 0                                                     
                            |
  | binding:host_id     |                                                       
                            |
  | binding:profile     | {}                                                    
                            |
  | binding:vif_details | {}                                                    
                            |
  | binding:vif_type    | unbound                                               
                            |
  | binding:vnic_type   | normal                                                
                            |
  | bond                | 0                                                     
                            |
  | cbs                 | 0                                                     
                            |
  | device_id           | 4039bd93-b183-4250-af0f-e9739ac1a19a                  
                            |
  | device_owner        | network:router_interface                              
                            |
  | dscp                | 0                                                     
                            |
  | extra_dhcp_opts     |                                                       
                            |
  | fixed_ips           | {"subnet_id": "b72b9698-6e07-4199-8c53-0411c90ce9d3", 
"ip_address": "10.10.10.9"} |
  | id                  | 90e0abe1-852b-4cfe-afd9-2bd31a42c279                  
                            |
  | mac_address         | fa:16:3e:c2:d5:bc                                     
                            |
  | name                |                                                       
                            |
  | network_id          | e4b72e3a-fcaf-4e29-9c30-9f219ac5643c                  
                            |
  | status              | DOWN                                                  
                            |
  | tenant_id           | 0d76aad1dda94f83a2a0a55c04547434                      
                            |
  
+---------------------+-----------------------------------------------------------------------------------+
  [root@tecs218 ~(keystone_admin)]# neutron router-interface-delete test  
port=90e0abe1-852b-4cfe-afd9-2bd31a42c279
  Removed interface from router test.
  [root@tecs218 ~(keystone_admin)]# neutron port-show 
90e0abe1-852b-4cfe-afd9-2bd31a42c279
  Unable to find port with name '90e0abe1-852b-4cfe-afd9-2bd31a42c279'

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to