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)
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)
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)
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)
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)
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)
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)
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)
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)