[Neutron]

Slawomir Kaplonski skaplons at redhat.com
Sat Dec 8 14:42:35 UTC 2018


Hi,

You shouldn’t create port with router as device owner. If You want to connect port or subnet to router, there is proper method for that: https://developer.openstack.org/api-ref/network/v2/?expanded=add-interface-to-router-detail#add-interface-to-router
 
— 
Slawek Kaplonski
Senior software engineer
Red Hat

> Wiadomość napisana przez Bino Oetomo <bino at jogjacamp.co.id> w dniu 08.12.2018, o godz. 02:42:
> 
> Dear All.
> 
> I have no problem configuring network via Hosrizon-dasboard.
> 
> I start playing with python for some task.
> I got succsess in creating network.
> I create a router, with one interface connected to existing 'ext-network' .. success.
> 
> But I fail when I try to add a port to that router for connecting to existing internal network.
> 
> Here is part of my python shell.
> 
> --------------------
> body_value = {
> 
>     
> 'port': {
> 
>         
> 'admin_state_up': True,
> 
>         
> 'device_owner': 'network:router_interface',
> 
>         
> 'device_id': 'a616dcc0-1f72-4424-9494-4d13b42445ee',
> 
>         
> 'name': 'Bino-net-01-02',
> 
>         
> 'network_id': 'dfc8ed54-106d-48d0-8b45-cbd3cf0fbb79',
> 
>         
> 'binding:host_id': 'rocky-controller.mynet.net',
> 
>         
> 'binding:profile': {},
> 
>         
> 'binding:vnic_type': 'normal',
> 
>         
> 'fixed_ips': [{
> 
>             
> 'subnet_id': 'c71a86a3-f9a8-4e60-828e-5d6f87e58ac9',
> 
>             
> 'ip_address': '192.168.202.254'
> 
>             
> }],
> 
>     
> }
> }
> 
> 
> response 
> = nt.create_port(body=body_value)
> 
> response
> 
>   
> {'port': {'allowed_address_pairs': [], 'extra_dhcp_opts': [], 'updated_at': '2018-12-07T08:10:24Z', 'device_owner': 'network:router_interface', 'revision_number': 1, 'port_security_enabled': False, 'binding:profile': {}, 'fixed_ips': [{'subnet_id': 'c71a86a3-f9a8-4e60-828e-5d6f87e58ac9', 'ip_address': '192.168.202.254'}], 'id': 'd02eb0f0-663f-423f-af4e-c969ccb9dc25', 'security_groups': [], 'binding:vif_details': {'port_filter': True, 'datapath_type': 'system', 'ovs_hybrid_plug': True}, 'binding:vif_type': 'ovs', 'mac_address': 'fa:16:3e:e2:9d:8f', 'project_id': 'c0b89f614b5a457cb5acef8fe8c2b320', 'status': 'DOWN', 'binding:host_id': 'rocky-controller.mynet.net', 'description': '', 'tags': [], 'device_id': 'a616dcc0-1f72-4424-9494-4d13b42445ee', 'name': 'Bino-net-01-02', 'admin_state_up': True, 'network_id': 'dfc8ed54-106d-48d0-8b45-cbd3cf0fbb79', 'tenant_id': 'c0b89f614b5a457cb5acef8fe8c2b320', 'created_at': '2018-12-07T08:10:24Z', 'binding:vnic_type': 'normal'}}
> 
> --------------------
> 'status' always 'DOWN'.
> 
> Kindly please give me some clue to fix this problem
> 
> Note : Actualy I post same question on stackexchange : https://stackoverflow.com/questions/53665795/openstack-python-neutronclient-creating-port-but-down
> 
> Sincerely
> -bino-




More information about the openstack-discuss mailing list