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