congressclient.v1.client module

congressclient.v1.client module

class congressclient.v1.client.Client(**kwargs)

Bases: object

Client for the Congress v1 API.

Example

from keystoneauth1.identity import v2
from keystoneauth1 import session
from congressclient.v1 import client
auth = v2.Password(auth_url=AUTH_URL, username=USERNAME,
                   password=PASSWORD, project_name=TENANT_NAME)
sess = session.Session(auth=auth)
congress = client.Client(session=sess,
                         auth=None,
                         interface='publicURL',
                         service_type='policy',
                         region_name='RegionOne')
congress.create_policy_rule(..)
create_datasource(body=None)
create_library_policy(body)
create_policy(body, library_policy_id=None)
create_policy_rule(policy_name, body=None)
datasource_actions = '/v1/data-sources/%s/actions'
datasource_path = '/v1/data-sources/%s'
datasource_rows = '/v1/data-sources/%s/tables/%s/rows'
datasource_schema = '/v1/data-sources/%s/schema'
datasource_status = '/v1/data-sources/%s/status'
datasource_table_path = '/v1/data-sources/%s/tables/%s'
datasource_table_schema = '/v1/data-sources/%s/tables/%s/spec'
datasource_tables = '/v1/data-sources/%s/tables'
datasources = '/v1/data-sources'
delete_datasource(datasource)
delete_library_policy(policy)
delete_policy(policy)
delete_policy_rule(policy_name, rule_id)
driver = '/v1/system/drivers'
driver_path = '/v1/system/drivers/%s'
execute_datasource_action(service_name, action, body)
execute_policy_action(policy_name, action, trace, delta, body)
library_policies = '/v1/librarypolicies'
library_policy_path = '/v1/librarypolicies/%s'
list_api_versions()
list_datasource_actions(datasource_name)
list_datasource_rows(datasource_name, table_name)
list_datasource_status(datasource_name)
list_datasource_tables(datasource_name)
list_datasources()
list_drivers()
list_library_policy(include_rules=True)
list_policy()
list_policy_rows(policy_name, table, trace=None)
list_policy_rules(policy_name)
list_policy_tables(policy_name)
policies = '/v1/policies'
policy_action = '/v1/policies/%s?%s'
policy_api_versions = '/'
policy_path = '/v1/policies/%s'
policy_rows = '/v1/policies/%s/tables/%s/rows'
policy_rows_trace = '/v1/policies/%s/tables/%s/rows?trace=True'
policy_rules = '/v1/policies/%s/rules'
policy_rules_path = '/v1/policies/%s/rules/%s'
policy_table_path = '/v1/policies/%s/tables/%s'
policy_tables = '/v1/policies/%s/tables'
request_refresh(driver, body=None)
show_datasource(datasource_name)

Get a single datasource

Intended for use by Horizon. Not available in CLI

show_datasource_schema(datasource_name)
show_datasource_table(datasource_name, table_id)
show_datasource_table_schema(datasource_name, table_name)
show_driver(driver)
show_library_policy(policy, include_rules=True)
show_policy(policy)
show_policy_rule(policy_name, rule_id)
show_policy_table(policy_name, table_id)
update_datasource_rows(datasource_name, table_name, body=None)

Update rows in a table of a datasource.

Args:
datasource_name: Name or id of the datasource table_name: Table name for updating body: Rows for update.
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.