Ask Your Question
0

Hi guys i'm unable to find the create router button on the dashboard. I'm going with openstack liberty on Opensuse 13.2

asked 2016-03-23 05:44:26 -0500

Nareshkumarboddu gravatar image

Naresh Kumar

edit retag flag offensive close merge delete

Comments

Can you please, provide more information about your issue. Add horizon logs Regards

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2016-03-23 05:46:28 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-03-23 07:04:49 -0500

dbaxps gravatar image

updated 2016-03-24 05:42:08 -0500

UPDATE 03/24/16
See for details
Python API for creating Neutron Router with internal interface and external gateway RDO Mitaka (build 20160322)
END UPDATE

You really cannot manage without this button :-

# . keystonerc_admin
# keystone tenant-list
Select <id> of yours tenant.Say xxxxxxxx
# neutron router-create  --tenant_id xxxxxxxxx  RouterViaCLI

Another option is to source your tenant credentials to shell and create file createRouter.py

#!/usr/bin/env python
from neutronclient.v2_0 import client
import os

def get_credentials():
    d = {}
    d['username'] = os.environ['OS_USERNAME']
    d['password'] = os.environ['OS_PASSWORD']
    d['auth_url'] = os.environ['OS_AUTH_URL']
    d['tenant_name'] = os.environ['OS_TENANT_NAME']
    return d

try:
    credentials = get_credentials()
    neutron = client.Client(**credentials)
    neutron.format = 'json'
    request = {'router': {'name': 'RouterMitaka',
                          'admin_state_up': True}}
    router = neutron.create_router(request)
    router_id = router['router']['id']
    router = neutron.show_router(router_id)
    print(router)

finally:
    print("Execution completed")

Then

python -m py_compile createRouter.py
python createRouter.py

Verify creation

[root@ServerCentOS01 test(keystone_boris)]# neutron router-list | grep Mitaka
| f5f49954-dbbc-4b2e-ade1-6dfe2e0755cf | RouterMitaka    | null

If you want understand Openstack you shouldn't need dashboard at all

1. Nova && Neutron CLI 
2. Python API ( keystoneclient,novaclient,neutronclient  and etc )
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-03-23 05:44:26 -0500

Seen: 681 times

Last updated: Mar 24 '16