Files
Dale Smith b7f6bc52c7 Add unauthenticated signup support to stacktask client.
* Unauthenticated requests to sign-up require --bypass-url as we can not
  use Openstack service catalog.

Change-Id: I1545e620e148bfffee46324bff9467f0cd6b6593
2016-10-03 22:39:41 +01:00

28 lines
982 B
Python

# Copyright (C) 2016 Catalyst IT Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from stacktaskclient.openstack.common.apiclient import base
class SignupManager(base.BaseManager):
def post(self, username, email, project_name):
url = '/openstack/sign-up'
fields = {
'username': username,
'email': email,
'project_name': project_name
}
return self.client.post(url, data=fields)