mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-04 01:30:15 +01:00
13 lines
408 B
Python
13 lines
408 B
Python
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
import sys
|
||
|
import base
|
||
|
import swagger_client
|
||
|
|
||
|
class Project(base.Base):
|
||
|
def create_project(self, name=base._random_name("project"),
|
||
|
metadata = {}, **kwargs):
|
||
|
client = self._get_client(**kwargs)
|
||
|
_, _, header = client.projects_post_with_http_info(
|
||
|
swagger_client.ProjectReq(name, metadata))
|
||
|
return base._get_id_from_header(header), name
|