
Create, edit, update and delete cloud providers. Lots of new functions and hard to explaing them all User create on provider. Change-Id: I8d45ea14b2f62551500acf809cdb5190119548bb
23 lines
653 B
Python
23 lines
653 B
Python
import requests, json
|
|
|
|
from openstack import connection, profile
|
|
|
|
from ..models import Provider
|
|
|
|
|
|
class Connect():
|
|
def create_connection(self, auth_url, region, project_name, username, password):
|
|
prof = profile.Profile()
|
|
prof.set_version('identity', 'v3')
|
|
prof.set_api_version('identity','v3')
|
|
prof.set_region(profile.Profile.ALL, region)
|
|
|
|
return connection.Connection(
|
|
profile=prof,
|
|
user_agent='examples',
|
|
auth_url=auth_url,
|
|
identity_api_version='3',
|
|
project_name=project_name,
|
|
username=username,
|
|
password=password
|
|
) |