This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
craton$ python craton/cmd/inventory-api.py --config-file=etc/inventory-api-conf.sample | |
2016-09-22 17:22:45.463 5447 INFO craton.api [-] Loading service with WSGI config: /home/vagrant/craton/etc/inventory-api-paste.ini | |
2016-09-22 17:22:45.543 5447 INFO __main__ [-] Starting API server in PID: 5447 | |
2016-09-22 17:22:53.662 5447 DEBUG oslo_db.api [-] Loading backend 'sqlalchemy' from 'craton.db.sqlalchemy.api' _load_backend /usr/local/lib/python2.7/dist-packages/oslo_db/api.py:238 | |
2016-09-22 17:22:53.877 5447 DEBUG passlib.utils.compat [-] loaded lazy attr 'SafeConfigParser': <class ConfigParser.SafeConfigParser at 0x7fe073c02390> __getattr__ /usr/local/lib/python2.7/dist-packages/passlib/utils/compat.py:413 | |
2016-09-22 17:22:53.882 5447 DEBUG passlib.utils.compat [-] loaded lazy attr 'NativeStringIO': <built-in function StringIO> __getattr__ /usr/local/lib/python2.7/dist-packages/passlib/utils/compat.py:413 | |
2016-09-22 17:22:53.884 5447 DEBUG passlib.utils.compat [-] loaded lazy attr 'BytesIO': <built-in function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@vagrant-ubuntu-trusty-64:~/craton$ python craton/cmd/inventory-api.py --config-file=etc/inventory-api-conf.sample | |
2016-09-26 16:42:47.673 30307 INFO craton.api [-] Loading service with WSGI config: /home/vagrant/craton/etc/inventory-api-paste.ini | |
2016-09-26 16:42:47.738 30307 INFO __main__ [-] Starting API server in PID: 30307 | |
2016-09-26 16:42:50.088 30307 DEBUG oslo_db.api [-] Loading backend 'sqlalchemy' from 'craton.db.sqlalchemy.api' _load_backend /usr/local/lib/python2.7/dist-packages/oslo_db/api.py:238 | |
2016-09-26 16:42:50.274 30307 DEBUG passlib.utils.compat [-] loaded lazy attr 'SafeConfigParser': <class ConfigParser.SafeConfigParser at 0x7f6ef20a37a0> __getattr__ /usr/local/lib/python2.7/dist-packages/passlib/utils/compat.py:413 | |
2016-09-26 16:42:50.275 30307 DEBUG passlib.utils.compat [-] loaded lazy attr 'NativeStringIO': <built-in function StringIO> __getattr__ /usr/local/lib/python2.7/dist-packages/passlib/utils/compat.py:413 | |
2016-09-26 16:42:50.277 30307 DEBUG passlib.utils.compat [-] load |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CellById(base.Resource): | |
def get(self, id): | |
context = request.environ.get('context') | |
try: | |
cell_obj = dbapi.cells_get_by_id(context, id) | |
except exceptions.NotFound: | |
return self.error_response(404, 'Not Found') | |
except Exception as err: | |
LOG.error("Error during Cell get by id: %s" % err) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@vagrant-ubuntu-trusty-64:~/craton$ craton-inventory-dbsync --config-file=etc/inventory-api-conf.sample upgrade | |
INFO [alembic.runtime.migration] Context impl MySQLImpl. | |
INFO [alembic.runtime.migration] Will assume non-transactional DDL. | |
INFO [alembic.runtime.migration] Running upgrade -> ffdc1a500db1, craton_inventory_init | |
Traceback (most recent call last): | |
File "/usr/local/bin/craton-inventory-dbsync", line 10, in <module> | |
sys.exit(main()) | |
File "/usr/local/lib/python2.7/dist-packages/craton/cmd/dbsync.py", line 69, in main | |
CONF.command.func() | |
File "/usr/local/lib/python2.7/dist-packages/craton/cmd/dbsync.py", line 12, in upgrade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 def cells_update(context, cell_id, values): | |
81 """Update an existing cell.""" | |
82 return IMPL.cells_update(context, cell_id, values) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@ubuntu-xenial:~/craton$ tox -e py35 -- -s | |
py35 develop-inst-nodeps: /home/ubuntu/craton | |
py35 installed: alembic==0.8.8,aniso8601==1.1.0,appdirs==1.4.0,automaton==1.4.0,Babel==2.3.4,cachetools==2.0.0,chainmap==1.0.2,click==6.6,contextlib2==0.5.4,-e git+http://github.com/openstack/craton.git@4679cbd1002efde4ba1f4baf86ecca7d14907dec#egg=craton,debtcollector==1.8.0,decorator==4.0.10,docutils==0.12,extras==1.0.0,fasteners==0.14.1,fixtures==1.4.0,flake8==3.0.4,Flask==0.11.1,Flask-RESTful==0.3.5,futurist==0.18.0,iso8601==0.1.11,itsdangerous==0.24,Jinja2==2.8,jsonschema==2.5.1,kazoo==2.2.1,keystoneauth1==2.13.0,linecache2==1.0.0,Mako==1.0.4,MarkupSafe==0.23,mccabe==0.5.2,mock==2.0.0,monotonic==1.2,mox3==0.18.0,msgpack-python==0.4.8,netaddr==0.7.18,netifaces==0.10.5,networkx==1.11,nose==1.3.7,os-client-config==1.21.1,oslo.config==3.17.0,oslo.context==2.9.0,oslo.db==4.13.3,oslo.i18n==3.9.0,oslo.log==3.16.0,oslo.middleware==3.19.0,oslo.serialization==2.13.0,oslo.utils==3.16.0,oslosphinx==4.7.0,oslotest==2.10.0,Pa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@ubuntu-xenial:~/craton$ tox -e py35 -- -s | |
py35 develop-inst-nodeps: /home/ubuntu/craton | |
py35 installed: alembic==0.8.8,aniso8601==1.1.0,appdirs==1.4.0,automaton==1.4.0,Babel==2.3.4,cachetools==2.0.0,chainmap==1.0.2,click==6.6,contextlib2==0.5.4,-e git+http://github.com/openstack/craton.git@4cafea5a54a352751436ad6417b7974e3fe7aab1#egg=craton,debtcollector==1.8.0,decorator==4.0.10,docutils==0.12,extras==1.0.0,fasteners==0.14.1,fixtures==1.4.0,flake8==3.0.4,Flask==0.11.1,Flask-RESTful==0.3.5,futurist==0.18.0,iso8601==0.1.11,itsdangerous==0.24,Jinja2==2.8,jsonschema==2.5.1,kazoo==2.2.1,keystoneauth1==2.13.0,linecache2==1.0.0,Mako==1.0.4,MarkupSafe==0.23,mccabe==0.5.2,mock==2.0.0,monotonic==1.2,mox3==0.18.0,msgpack-python==0.4.8,netaddr==0.7.18,netifaces==0.10.5,networkx==1.11,nose==1.3.7,os-client-config==1.21.1,oslo.config==3.17.0,oslo.context==2.9.0,oslo.db==4.13.3,oslo.i18n==3.9.0,oslo.log==3.16.0,oslo.middleware==3.19.0,oslo.serialization==2.13.0,oslo.utils==3.16.0,oslosphinx==4.7.0,oslotest==2.10.0,Pa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testtools.testresult.real._StringException: Traceback (most recent call last): | |
File "/home/ubuntu/craton/craton/tests/unit/db/test_networks.py", line 182, in test_interface_update | |
{'name': 'eth2'}) | |
File "/home/ubuntu/craton/craton/db/api.py", line 333, in net_interfaces_update | |
return IMPL.net_interfaces_update(context, interface_id, values) | |
File "/home/ubuntu/craton/craton/db/sqlalchemy/api.py", line 835, in net_interfaces_update | |
net_interface_ref.save(session) | |
File "/home/ubuntu/craton/.tox/py35/lib/python3.5/site-packages/oslo_db/sqlalchemy/models.py", line 47, in save | |
session.add(self) | |
File "/home/ubuntu/craton/.tox/py35/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1588, in add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export MY_IP=172.17.0.1 | |
root@syed-carton-keystone:~# curl -i "http://${MY_IP}:8080/v1/regions" \ | |
> -H "Content-Type: application/json" \ | |
> -H "X-Auth-Token: demo" \ | |
> -H "X-Auth-User: demo" \ | |
> -H "X-Auth-Project: b9f10eca66ac4c279c139d01e65f96b4" | |
HTTP/1.0 200 OK | |
Date: Mon, 24 Oct 2016 20:05:03 GMT | |
Server: WSGIServer/0.2 CPython/3.5.2 | |
Content-Type: application/json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DEFAULT] | |
# Set Debug level | |
debug=True | |
# Log file for craton inventory | |
log_file=craton-api.log | |
[api] | |
# Host IP to use for API service | |
host=0.0.0.0 | |
# Port to use for API service |