Commit Graph

66 Commits

Author SHA1 Message Date
Andreas Jaeger e88f6b747a Retire craton
Remove everything, add a README with explanation.

Change-Id: I7c8fcfac0d904f144b6a3838d25db0987d1e74a5
2018-01-18 15:22:28 +01:00
Thomas Maddox 96b6a40288 Add documentation for JSON Path-like variable searching
Change-Id: I8a3648ba5c94bc27bc0bcf0c7ebb9de19a9c4818
2017-03-29 14:33:33 +00:00
Jenkins 1b680b2532 Merge "Adding wrapper functions to tools" 2017-03-28 04:51:25 +00:00
Michael Porras bb515d45f2 Adding wrapper functions to tools
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
2017-03-27 13:35:43 -05:00
Jenkins bd0a175f34 Merge "Remove link to modindex" 2017-03-27 17:52:12 +00:00
Ian Cordasco 0bbc4edc82 Update status of existing specifications
These two specifications are actually implemented and so can be moved
from approved to implemented.

Change-Id: Id78dffdf286e6d1e3eeba50e2d686f25c8257b1e
2017-03-23 08:48:06 -05:00
Jenkins a2d645c6ee Merge "Docker and dev Documentation update" 2017-03-22 19:35:15 +00:00
Michael Porras b571719f67 Docker and dev Documentation update
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
2017-03-22 11:28:09 -05:00
Antony Messerli 4aa1e5acb7 Modify docs to use python3 -m pip instead
Adds a few doc suggestions from previos review

Change-Id: I1b1950cd46001fdc6bc34d38aa14f824c9aa490d
2017-03-22 11:15:45 -05:00
Thomas Maddox 6884f8ff8c Move to MySQL 5.7 and SQLAlchemy>=1.1.0
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
2017-03-21 21:22:55 +00:00
Jenkins 35ff3cf96f Merge "Updates documentation for setting up a dev env" 2017-03-21 16:16:40 +00:00
Antony Messerli ec52862ec6 Updates documentation for setting up a dev env
Updates docs for Ubuntu Xenial, CentOS 7, and
Fedora 25 setup of Craton for setting up an
initial development environment.

Change-Id: I8769860db0ea20f04f193de5e4f06218e89959d0
2017-03-21 08:22:00 -05:00
Sulochan Acharya 9ddf2c4cd5 Include project_id only where needed
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
2017-03-20 09:33:59 +00:00
Jenkins 667ac16008 Merge "Adds project/user bootstrap command to dbsync" 2017-03-13 20:48:06 +00:00
Sulochan Acharya 109b4b6dd2 Adds project/user bootstrap command to dbsync
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
2017-03-13 20:30:03 +00:00
Tomi Juvonen c18917cdc4 docker install documentation not consistent
Order of commands and usage of ContainerId and ContainerIP should be
consistent and examples need to work.

Change-Id: I7bb7cee608aeef1916ed9d17fa67566943291af9
Closes-bug: 1671067
2017-03-08 19:35:53 +02:00
Syed Ahsan Shamim Zaidi 7318f067ad Documentation Fix for Region Create
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
2017-03-03 23:02:07 +00:00
Kevin Carter d464139d34
Move craton to a non-conflicting port
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>
2017-03-01 17:30:22 -06:00
git-harry f9724d3b91 Add GET /v1/devices
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
2017-02-24 17:22:07 +00:00
git-harry 32a3d7e751 Add devices endpoint
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
2017-02-21 18:23:30 +00:00
Jenkins ed85352067 Merge "Adds Network-Devices to docs" 2017-02-12 17:10:36 +00:00
Mark Harrington 5411d8fc84 Update POST response code and add location header
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
2017-02-07 21:44:50 +00:00
Jovon McCloud c1452bd617 Adds Network-Devices to docs
This patch implements net devices documentation

Change-Id: I2486dbb0fab5d5be05c1068403641a94a3d6ed86
Closes-bug:  #1661732
2017-02-06 17:03:27 +00:00
avnish 86a22c6efe Remove link to modindex
The documentation build does not generate any module index, thus
remove the link to the page.

Change-Id: I294a94717f2e67a366458bf9747ef37df2288c55
2017-02-03 11:14:42 +05:30
Antony Messerli 8d5524d9d7 Update development environment docs for python3
Updates the development environment docs to reflect
python3 dependencies

Change-Id: Ib19eebb4caabf29462555d529eb475220499b393
2017-02-01 12:22:22 -06:00
Ian Cordasco 0cc403fec2 Add specification for list pagination
Related-to: blueprint pagination-of-resources
Change-Id: Ia79276b0278c04ed7c404c74ba90b84e1d7600a0
2017-01-09 14:49:02 -06:00
Ian Cordasco 9abf0a0a53 Add specification detailing Craton's URL design
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
2016-12-14 11:43:06 -06:00
Ian Cordasco e375ac88e9 Add specification directory, template, and indices
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
2016-12-08 12:28:38 -06:00
Jenkins 68a49caa75 Merge "Adds sample API calls and responses to docs" 2016-12-06 22:54:08 +00:00
Jovon McCloud 879a5a1913 Adds sample API calls and responses to docs
Adds sample API calls and responses for Reions, Cells, and Host docs
Also refractors data to variables

Change-Id: Id80617d32761812fd7f4fb6a9e14c91ab566713f
Closes-Bug: 1645812
2016-12-06 17:37:26 +00:00
Syed Ahsan Shamim Zaidi 87f2ba178f Update Developer guide to include Tox usage
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
2016-12-05 15:24:32 +00:00
git-harry 97b8775301 Remove code related to Python versions before 3.5
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
2016-11-24 12:31:14 +00:00
Sulochan Acharya 3f93960d27 Always pull new image if available
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
2016-11-23 16:34:03 +00:00
Syed Ahsan Shamim Zaidi 7f6925bf1f Minor Documentation Fixup
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
2016-11-21 19:54:55 +00:00
Jenkins ae085caebd Merge "Merge API docs with Craton RTD" 2016-11-17 17:59:22 +00:00
Ubuntu 09563799e2 Merge API docs with Craton RTD
this patch adds api documentation for craton's "read the docs"

Change-Id: I1513f90fb52251ae15d387b6cd691045bdbd1a70
Closes-bug: #1606865
2016-11-11 18:18:25 +00:00
Jenkins be0f2746ea Merge "Fix dev environment setup instructions" 2016-11-09 21:36:05 +00:00
Mike Dorman 3d0503e08a Fix dev environment setup instructions
Change setuptools install step to use apt-get/yum rather than pip.

Change-Id: I6db53460de3c66b449a7d5d085e997f716c1e5c0
2016-11-09 10:36:23 -07:00
Syed Ahsan Shamim Zaidi 8e87d5b797 Update Docker Installation Guide
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
2016-11-01 20:26:59 +00:00
Jenkins bfd2dff831 Merge "Add a couple missing notes to the Keystone docs" 2016-10-31 15:40:37 +00:00
Jenkins 2ae9f3c3fa Merge "Updated Docs to Match Dockerfile" 2016-10-31 12:55:44 +00:00
Ian Cordasco d0f4598acf Add a couple missing notes to the Keystone docs
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
2016-10-31 07:10:00 -05:00
Michael Turvey 273dbac959 Updated Docs to Match Dockerfile
Fixed instructions to run docker image by replacing directions
with the contents of the Dockerfile

Closes-Bug: #1637737
Change-Id: I54e3fb511559bde7d1059b15f7abc69eaa032f79
2016-10-29 08:41:48 -07:00
Ian Cordasco 7e49a8a0fc Add pre-configured paste pipelines
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
2016-10-21 08:08:02 -05:00
Ian Cordasco 2407803170 Fix Keystone integration
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
2016-10-20 15:36:57 -05:00
Ian Cordasco 096c6450e8 Switch project_id from integer to UUID
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
2016-10-18 14:12:13 -05:00
Syed Ahsan Shamim Zaidi 2dd9194574 Update setup.cfg and docker_run.sh
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
2016-10-13 01:20:14 +00:00
Ian Cordasco 9472198c22 Fix up directive names in dev docs
Change-Id: Ia44779316871f57b1f2d8398739763bc79651bb5
2016-10-10 08:11:01 -05:00
Syed Ahsan Shamim Zaidi 6e6b3e33aa Update Install Guide
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
2016-10-07 17:13:11 +00:00
Sulochan Acharya 393c7452f0 Change file names from inventory to craton-api
- 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
2016-10-05 23:35:32 +01:00