Exemplo n.º 1
0
    def register_compute_server(self, data):
        log_action('Register Compute Server')

        link = '/computes'

        self.compute_data = post(self.session, self.address, link, data,
                                 CODE.created)
Exemplo n.º 2
0
    def delete_project(self, project_uuid):
        log_action('Delete project: %s' % project_uuid)

        expected_status_code = CODE.no_content
        link = '/projects/%s' % project_uuid

        delete(self.session, self.address, link, expected_status_code)
Exemplo n.º 3
0
    def update_project(self, project_uuid, data):
        log_action('Update project: %s' % project_uuid)

        expected_status_code = CODE.ok
        link = '/projects/%s' % project_uuid

        self.project_data = put(self.session, self.address, link, data,
                                expected_status_code)
Exemplo n.º 4
0
    def get_project(self, project_uuid):
        log_action('Get project:' % project_uuid)

        expected_status_code = CODE.ok
        link = '/projects/%s' % project_uuid

        self.project_data = post(self.session, self.address, link,
                                 expected_status_code)
Exemplo n.º 5
0
    def get_all_projects(self):
        log_action('Get all projects')

        expected_status_code = CODE.ok
        link = '/projects'

        self.projects_list = get(self.session, self.address, link,
                                 expected_status_code)
Exemplo n.º 6
0
    def create_project(self, data):
        log_action('Create project')

        expected_status_code = CODE.created
        link = '/projects'

        self.project_data = post(self.session, self.address, link, data,
                                 expected_status_code)
Exemplo n.º 7
0
    def load_project(self, path, **kwargs):
        log_action('Load project: %s' % path)

        expected_status_code = CODE.created
        link = '/projects/load'
        data = {'path': path}

        data.update(kwargs)

        self.project_data = post(self.session, self.address, link, data,
                                 expected_status_code)
Exemplo n.º 8
0
    def get_compute_server_data(self):
        log_action('Get Compute Server Data')

        link = '/computes'

        self.compute_list = get(self.session, self.address, link, CODE.ok)
Exemplo n.º 9
0
    def create_node(self, data):
        log_action('Create node')

        link = '/projects/%s/nodes' % self.project_id

        self.node_data = post(self.session, self.address, link, data, CODE.created)