Initial service skeleton

Change-Id: Ic9f4cd17d6269b8de34aae114463901f956f6cb0
Initial authorization implementation

We use basic authorization, as defined by sepcification. In
pre-request hook we check credentials and save http client in
flask.g for future use.

We also add 'noneatall' authorization mode to ease running of
simple unit tests.

Change-Id: Ib5926ecb31566d8f5b4fb0d02797e4b254ae33a4
Improved error 500 handler

- don't return json for unauthorized requests;
- added tests.

Change-Id: If7971989b4fbc25aad313bc37b01a549d85fa2c5
Moving collections api to 'collections' package

Change-Id: If00e7bc6948f6ce4b4744cc4b4c7e1d2ffcd78ca
Making import paths absolute

Change-Id: I86bbe1da3abc344791ee4fe0c616c38742c42bae
setup.py: require OpenStack and clients for it

We are going to use openstack clients and nova python module, so we
add them to install-requires list.

Change-Id: Idb0947b613ada68a0b8d3a1b79bc35cfd98ae4d0
Auth: use ClientSet for auth.

Instead of HttpClient, we create ClientSet in systenant, and save it
into flask.g. We also provide new function, is_authenticated, to
make this check more convenient.

Change-Id: I434108a1bacfa15d63e09b57122ce9c682589d14
Initial delibery unbuildable spec, for CI integration

Change-Id: I4100d3686a820912a984e8772fc11448270d2e47
Implement DEBUG, HOST and PORT configuration parameters

Change-Id: Ifa8b8434ff0aa76fb332b9b6d363d9826674b787
Exception classes for invalid requests, with handlers

This commit adds exception submodule with InvalidRequest exception
class and its subclasses. This classes will be used when client requests
something wrong.

We also provide error handlers for them, which return status code 400
and JSON with some error information.

Change-Id: Iedf07769643a9440fda03cc53e624111bfe17cb1
Removed AUTHORIZATION_MODE configuration parameter

It was used only for tests. Now tests stub out authentication for tests,
and always work with keystone otherwise.

Change-Id: I1ff89ffa36f33179018ef033f4c5bb4d439e824b
Always response with correct JSON

Even if client was not properly authentificated, we return correct
JSON response with right content-type.

This commit also significantly improves auth fake used for tests.

Change-Id: I5022096525a5a0fa5842ba3483ee1de331666541
Tests: mock client set completely

This commit provides means to mock client set completely, with all
the clients and managers that usually live inside it. This will help
to significantly reduce boilerplate for tests that need to mock
lots of clients.

Change-Id: I2fe12d931d4e91d6d755a95e5fcf0c7c7939930d
Implemented Networks API

Amended-by: Ivan A. Melnikov <imelnikov@griddynamics.com>
Amended-by: Alessio Ababilov <aababilov@griddynamics.com>
Change-Id: Id25aca055fde8dbee490910e25da0308f94f6ad1
Instance types management

More checks, including check for administrative permissions and input
validation, are to be done later.

Change-Id: Icc4f2a0aebab0eb6f6d4b92e2761c057c70703b3
Implemented projects management

Change-Id: Ic0a5361b13c8f32e1d6598be5fe7c7549efdd2ae
Implement firewall rules and rule sets management

You can't rename rule set or change description (need support from
OpenStack). More checks are also yet to come.

Change-Id: Ibc75a85da6408e48d13fd54fcb862b1cfe3b74a4
Make the spec buildable

Change-Id: I7c874f898ab3d7861449adfa8cae97165aa768d5
Check request headers and arguments.

- check request headers:
    - Accept-Charset;
    - Accept;
    - Content-Type;
    - Expect;
    - If-*;
- return JSON in 417 response;
- check that all request arguments are used (now none are used, but this
  commit provides infrastructure for that);
- improved tests.

Change-Id: I59f1091448be92519b9fd920cba2f0310c49d623
Helper to return collection.

This commit provides and integrates a helper function that constructs
correct response object for collection list operation. It adds
collection meta-information, applies pagination and constructs correct
JSON response.

This commit also implements parsing request arguments limit and offset.

Change-Id: I223dd233f1e6280ff87f929289b03032d11d075a