mounikasreeram 90d71c0749 Add Sync template feature to KB-client.
Existing feature "sync create" is to sync single resource-type
to single target region i.e one resource off one resource-type
to one region.
Issue with "sync create":
Kingbird cannot sync more than one resource-type to multiple
target regions in a single request.
This commit from kingbird client is to enhance the existing
"sync create" job.
Working of sync template feature:
User have to provide a input file with .yaml or .yml or .json extension.
This input file should consists of
    ->resource-type
    ->resources
    ->source_region
    ->target_region.
Added testcases for the same.

Change-Id: I5fb0e4619b20201585e5398013ba25219e24dc80
2017-12-08 10:19:34 +05:30
2016-07-07 14:09:12 +02:00
2016-07-07 14:09:12 +02:00
2016-07-07 08:33:25 +00:00
2016-07-07 14:09:12 +02:00
2016-07-07 14:09:12 +02:00
2016-07-07 14:09:12 +02:00
2016-07-07 14:09:12 +02:00
2016-07-07 14:09:12 +02:00
2016-07-07 14:09:12 +02:00
2016-07-07 14:09:12 +02:00
2016-09-08 10:57:01 +02:00
2017-03-08 12:56:45 +00:00

Kingbird

Latest Version

Downloads

Centralised service for multi-region OpenStack deployments.

Kingbird is an centralized OpenStack service that provides resource operation and management across multiple OpenStack instances in a multi-region OpenStack deployment. This service is part of the OPNFV Multisite project that intends to address the use cases related to distributed cloud environments.

Kingbird provides features like centralized quota management, centralized view for distributed virtual resources, global view for tenant level IP/MAC address space management, synchronisation of ssh keys, images, flavors, etc. across regions.

python-kingbirdclient

Python client for Kingbird

This is a client library for Kingbird built on the Kingbird API. It provides a Python API (the kingbirdclient module) and a command-line tool (kingbird).

Installation

First of all, clone the repo and go to the repo directory:

$ git clone https://github.com/openstack/python-kingbirdclient.git
$ cd python-kingbirdclient

Then just run:

$ pip install -e .

or:

$ pip install -r requirements.txt
$ python setup.py install

Running Kingbird client

If Kingbird authentication is enabled, provide the information about OpenStack auth to environment variables. Type:

$ export OS_PROJECT_DOMAIN_ID=<PROJECT_DOMAIN_ID>
$ export OS_REGION_NAME=<Region>
$ export OS_USER_DOMAIN_ID=<USER_DOMAIN_ID>
$ export OS_PROJECT_NAME=<project_name>
$ export OS_IDENTITY_API_VERSION=<identity_version>
$ export OS_PASSWORD=<password>
$ export OS_AUTH_TYPE=<auth_type>
$ export OS_AUTH_URL=http://<Keystone_host>/identity
$ export OS_USERNAME=<user_name>
$ export OS_TENANT_NAME=<tenant_name>

Note

In client, we use Keystone auth version v3 as server supports only v3.*

To make sure Kingbird client works, type:

$ kingbird quota defaults

or:

$ kingbird sync list

You can see the list of available commands typing:

$ kingbird --help

About sync template command

Provide the input file in .yaml/.yml/.json to sync multiple resource-types to multiple regions Sample input file for .yaml/.yml --------------------------------Eg:

Sync:
- resource_type: fake_resource_type
  resources:
  - fake_resource_1
  - fake_resource_2
  source_region:
  - fake_source_region
  target_region:
  - fake_target_region_1
  - fake_target_region_2

Sample input file for .json --------------------------Eg:

{
  "Sync": [
    {
      "resource_type": "fake_resource_type",
      "resources": [
        "fake_resource_1",
        "fake_resource_2"
      ],
      "source_region":["fake_source_region"],
      "target_region":["fake_target_region_1","fake_target_region_2"]
    }
  ]
}

Useful Links

Description
Python client for Kingbird
Readme 935 KiB
Languages
Python 98.4%
Shell 1.4%
reStructuredText 0.2%