Adding wrapper functions to the tools directory. Updating development docs
advising users to clone the sample config to a dev config. The dev config
allows users to launch craton directly and in docker without constant config
changes.
Change-Id: I6c32c86ef84fdcf02077fea226e20110826b1f21
Closes-Bug: #1675113
These two specifications are actually implemented and so can be moved
from approved to implemented.
Change-Id: Id78dffdf286e6d1e3eeba50e2d686f25c8257b1e
Updating dev install documentation to include pymysql database connection.
Updating docker documentation to gather bootstrap auth credentials and
change api port.
Change-Id: I5df061749f7c4143c7d2b3f7f6fecddd5be0223b
Closes-Bug: #1674731
In an effort to support JSON Path variable
queries, we need to:
* Pin to MySQL 5.7
* Use JSON column type
* Use a newer SQLAlchemy library.
Change-Id: I98ae021c9cd9755f51e67e56135db164e8ae1f50
Partial-Bug: 1671116
Depends-On: I36b7ae9cf68aeef0e5dbcb1f17db52b81efd6ffe
Updates docs for Ubuntu Xenial, CentOS 7, and
Fedora 25 setup of Craton for setting up an
initial development environment.
Change-Id: I8769860db0ea20f04f193de5e4f06218e89959d0
Currently project_id is allowed in request body
for all request, however, its not honered since project_id
is pulled from headers.
This commit separates the need for project_id only where
its needed. For instance, in users we expect project_id
to allow creating users for different projects or we
expect project_id in response body.
Partial-Bug: 1666695
Change-Id: Ie5fac9ef4c305ff7e67fe32855ca8100a8adfa82
So far we have been using external mysql command
to insert project/user to bootstrap the process.
This caused much frustration since operators needed
to insert records in the db. This patch adds commands
to dbsync to allow creating project/users. This method
also takes care of association_id.
To initiate a bootstrap:
craton-dbsync --config-file=craton.conf bootstrap
which will create a project with a root user.
Users using Dockerfile can look at docker logs
after creating the container to find this info.
Closes Bug: 1670561
Change-Id: I9372961ca6623d530d7844b9f38aade544d961e8
Order of commands and usage of ContainerId and ContainerIP should be
consistent and examples need to work.
Change-Id: I7bb7cee608aeef1916ed9d17fa67566943291af9
Closes-bug: 1671067
Currently the region create command doesn't work because of
Cloud_id change. This patch fixes this since in order to create
a region, we first need a cloud id to associate with.
Change-Id: I6aaef86cb1960b3fee77c48d0c53754177d3b9cf
This change moves craton to a port that is not in use according to
/etc/services and is not being consumed by any other OpenStack service
as defined here: [
https://docs.openstack.org/newton/config-reference/firewalls-default-ports.html
]. This should allow other deployers to leverage craton in an way that
does not conflict with other OpenStack services already running in
production.
Change-Id: I2d0432b4c608cf11538d7b8f267eaf7be763204c
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit adds support for a devices endpoint to allow the listing of
heterogeneous collections of devices. This complements the hosts and
network-devices endpoints that only allow the listing of devices of
their respective types.
The devices endpoint supports the query parameter "descendants", this
allows the user to choose whether or not a query includes the
descendants of a specified parent_id. For example
'/v1/devices?parent_id=3&descendants=true' would return any devices with
a parent_id of 3 as well as any descendants of those devices.
The devices DB model has been extended to include a descendants property
to allow a device's descendants to be determined.
The functional testing database clean-up has been modified to enable to
tables to be deleted when devices have been given parent_id's.
create_region and create_host methods have been moved to the base
TestCase class to prevent duplicating this code in the new tests.
Change-Id: Ia6f8dca6cbbf3d583bdff69559be0e803d2cf6de
Co-Authored-By: Jim Baker <jim.baker@python.org>
Implements: bp/list-devices
There is a need to be able to query devices in general instead of
specific types of device, to allow more useful collections to be
returned such as related devices.
blueprint list-devices
APIImpact
Change-Id: I8a871eb8b10bae331869130b9c81173ed3528a66
This commit updates POST responses based on API-WG guidelines [1] and
RFC 2616 [2]. Specifically:
- POST requests have been updated to return '201 (Created)' on success
(previously returned 200)
- a Location header field has been added to responses (previously not
included in response)
In addition:
- The unit tests have been updated to deal with 201 return codes and
to check for the presense of the Location header
- The generate_fake_data script has been updated to deal with 201
return codes
- POST requests in the documentation have been updated to the
new status code
[1] https://specs.openstack.org/openstack/api-wg/guidelines/http.html
[2] https://tools.ietf.org/html/rfc2616#section-9.5
Change-Id: I2246ff5edfa6fccd9711b67efb73504fb1eb2653
Closes-bug: 1658800
After significant discussion, the Craton team has come to the conclusion
that we want to use a simple, flat, and concise URL structure for
current and future development. This specification provides the
reasoning for that decision and an enumeration of the work items
required for its successful implementation.
Describes-Blueprint: url-structure-and-design
Change-Id: I6f39bcf904e625bc39b0fa2936ac00864af8d90c
We've discussed moving to specifications so discussion and reviews can
take place on Gerrit. This will still integrate with LaunchPad
blueprints which will allow us to track work but allow us to communicate
more around them.
Change-Id: I426d3908b94425e2c3d793a4911ca453726889aa
Adds sample API calls and responses for Reions, Cells, and Host docs
Also refractors data to variables
Change-Id: Id80617d32761812fd7f4fb6a9e14c91ab566713f
Closes-Bug: 1645812
Currently the document doesn't include the usage of tox. This patch
adds the usage of how to run tests for both unit and functional
testing
Change-Id: I6cef236ef2ac2e183239aa078eb87ec7b6758352
Closes-bug: #1646951
This commit removes any occurrence of the library six.
Six is used to aid in writing code that is compatible with both Python 2
and Python 3. Craton no longer supports the use of Python 2.x, and so
six is no longer required.
The minimum version of Python supported is 3.5, the classifiers are
updated accordingly in setup.cfg.
The docs have been updated to specify 3.5 as the minimum version.
Tox no longer attempts to test against Python 3.4.
This change also removes .travis.yml because it is left over from
from before the project was moved to the OpenStack project namespace and
is no longer required.
Closes-bug: #1630003
Change-Id: I63cba2b6f21a507c0ff02edbef24b663af400c12
Adds --pull flag to build process such that
cache is always used if there is not new image
available. If a new image exists that gets pulled.
This ensures we always run latest image on 16.04
Change-Id: I5cc6e6d9f9782ed99d01e088a88ce1f960d502cd
Closes-Bug: #1644294
This patch fixes a bug in documentation. Currently the developer
install guide doesn't have a character set defined when creating
database craton. This patch fixes this.
Change-Id: I69ef0aef66d4f0a60b933d4d8959f2606db7bb3c
Docker Installation guide needs to be updated with Project ID
as per tools/docker_run.sh. Also some adjustments are made which would
be helpful for users.
Change-Id: Ief1a87d06e37f58f8aae0423125f2a1794918d1c
When I wrote the docs I forgot to include the --region flag for creating
the craton endpoints. I also forgot to mention that you may want to
either use http as the protocol for your Keystone service or
insecure=True.
Change-Id: Ie6078f5bca1d37fb56b0a3c9fddc1364c0e03141
Fixed instructions to run docker image by replacing directions
with the contents of the Dockerfile
Closes-Bug: #1637737
Change-Id: I54e3fb511559bde7d1059b15f7abc69eaa032f79
Since we're now more actively supporting Keystone authentication and
authorization, it makes sense to have pre-configured pipelines in our
Paste config that can be selected via our craton-api config file.
This adds the `paste_pipeline` config option in the api section. This
allows deployers to select which pipeline they want to use.
Change-Id: Ia67915afacd185210192cbff212a6f1080f0192a
We add the necessary Paste filters for Keystone middleware and context
usage inside of Craton so that operators can use Keystone for Identity
and Access Management of Craton.
We also clean up our Keystone Context Middleware to access the
attributes that the keystonemiddleware library set on a request object
so we can determine if the token sent has been validated and what the
roles the user own.
Due to the effort exerted to get this working, this also adds
documentation around how to set up Craton to use Keystone for identity
and adds a tiny script in the `tools/` directory so that one can explore
the API interactively with keystone authentication.
Change-Id: Ida86881f1e6097b1a1f6dec912f094c53c2f4cc2
When looking at integrating craton with Keystone, it became apparent
that we could not store project_id's from Keystone in Craton's Database.
All of our project_id columns are Integers and Keystone uses UUIDs by
default. As a result, we've switched Craton to use UUIDs for Project IDs
and tweaked the docker tooling and install documentation.
Change-Id: I4b84f6ac23ffd128e0060fd929c6f0c60ee16d52
Closes-bug: 1634191
We need to update setup.cfg, docker_run.sh and install guide
to update the entry points for craton api server.
Change-Id: Ia1ae1a4f9467b352b45ba53f93eca0751191cdbb
Closes-bug: #1619076
Currently the install guide points to some wrong paths, this patch
fixes this. Also, this is a python3 project, so it has been specified
in the install guide.
Change-Id: Ife19d738c0e37538bf5d4d5623a7dee9a955898a
Closes-bug:#1631179
- Since its not just inventory, and the service
now includes everything craton the file names
should reflect the same.
Fixes Bug: 1630784
Change-Id: I0fb77942a92bbf2aacbf2c4a7d0c3104ed8bebfe