Exemple #1
0
 def create_tag(self, project_name, repo_name, reference, tag_name, expect_status_code = 201, ignore_conflict = False, **kwargs):
     client = self._get_client(**kwargs)
     tag = v2_swagger_client.Tag(name = tag_name)
     try:
         _, status_code, _ = client.create_tag_with_http_info(project_name, repo_name, reference, tag)
     except ApiException as e:
         if e.status == 409 and ignore_conflict == True:
             return
     base._assert_status_code(expect_status_code, status_code)
Exemple #2
0
 def create_tag(self,
                project_name,
                repo_name,
                reference,
                tag_name,
                expect_status_code=201,
                **kwargs):
     client = self._get_client(**kwargs)
     tag = v2_swagger_client.Tag(name=tag_name)
     _, status_code, _ = client.create_tag_with_http_info(
         project_name, repo_name, reference, tag)
     base._assert_status_code(expect_status_code, status_code)