remove with_signature (#21420)

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
Wang Yan 2025-01-16 13:51:07 +08:00 committed by GitHub
parent b4c3c73391
commit 2140a283bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 11 additions and 27 deletions

View File

@ -997,12 +997,6 @@ paths:
type: boolean
required: false
default: false
- name: with_signature
in: query
description: Specify whether the signature is included inside the tags of the returning artifacts. Only works when setting "with_tag=true"
type: boolean
required: false
default: false
- name: with_immutable_status
in: query
description: Specify whether the immutable status is included inside the tags of the returning artifacts. Only works when setting "with_immutable_status=true"
@ -1313,12 +1307,6 @@ paths:
- $ref: '#/parameters/sort'
- $ref: '#/parameters/page'
- $ref: '#/parameters/pageSize'
- name: with_signature
in: query
description: Specify whether the signature is included inside the returning tags
type: boolean
required: false
default: false
- name: with_immutable_status
in: query
description: Specify whether the immutable status is included inside the returning tags

View File

@ -114,7 +114,6 @@ export class ArtifactTagComponent implements OnInit, OnDestroy {
projectName: this.projectName,
repositoryName: dbEncodeURIComponent(this.repositoryName),
reference: this.artifactDetails.digest,
withSignature: true,
withImmutableStatus: true,
q: encodeURIComponent(`name=${name}`),
};
@ -165,7 +164,6 @@ export class ArtifactTagComponent implements OnInit, OnDestroy {
repositoryName: dbEncodeURIComponent(this.repositoryName),
reference: this.artifactDetails.digest,
page: pageNumber,
withSignature: true,
withImmutableStatus: true,
pageSize: this.pageSize,
sort: getSortingString(state),

View File

@ -23,8 +23,6 @@ class Artifact(base.Base, object):
def get_reference_info(self, project_name, repo_name, reference, expect_status_code = 200, ignore_not_found = False,**kwargs):
params = {}
if "with_signature" in kwargs:
params["with_signature"] = kwargs["with_signature"]
if "with_tag" in kwargs:
params["with_tag"] = kwargs["with_tag"]
if "with_scan_overview" in kwargs:

View File

@ -53,7 +53,7 @@ class TestP2P(unittest.TestCase):
2. Delete user(UA).
"""
user_id, user_name = self.user.create_user(user_password = self.user_password, **ADMIN_CLIENT)
USER_CLIENT=dict(with_signature = True, endpoint = self.url, username = user_name, password = self.user_password)
USER_CLIENT=dict(endpoint = self.url, username = user_name, password = self.user_password)
#2. Create a new distribution instance;
instance_id, instance_name = self.preheat.create_instance( **ADMIN_CLIENT)

View File

@ -54,7 +54,7 @@ class TestProxyCache(unittest.TestCase):
2. Delete user(UA).
"""
user_id, user_name = self.user.create_user(user_password = self.user_password, **ADMIN_CLIENT)
USER_CLIENT=dict(with_signature = True, endpoint = self.url, username = user_name, password = self.user_password)
USER_CLIENT=dict(endpoint = self.url, username = user_name, password = self.user_password)
image_for_docker = dict(image = "for_proxy", tag = "1.0")
image_for_ctr = dict(image = "redis", tag = "latest")

View File

@ -47,7 +47,7 @@ class TestProjects(unittest.TestCase):
#1. Create user-001
TestProjects.user_id, user_name = self.user.create_user(user_password = user_001_password, **ADMIN_CLIENT)
TestProjects.USER_CLIENT=dict(with_signature = True, endpoint = url, username = user_name, password = user_001_password)
TestProjects.USER_CLIENT=dict(endpoint = url, username = user_name, password = user_001_password)
#2. Create a new private project(PA) by user(UA);
TestProjects.project_id, TestProjects.project_name = self.project.create_project(metadata = {"public": "false"}, **TestProjects.USER_CLIENT)

View File

@ -52,7 +52,7 @@ class TestProjects(unittest.TestCase):
#1. Create user-001
TestProjects.user_sign_image_id, user_sign_image_name = self.user.create_user(user_password = user_001_password, **ADMIN_CLIENT)
TestProjects.USER_sign_image_CLIENT=dict(with_signature = True, endpoint = url, username = user_sign_image_name, password = user_001_password)
TestProjects.USER_sign_image_CLIENT=dict(endpoint = url, username = user_sign_image_name, password = user_001_password)
#2. Create a new private project(PA) by user(UA);
TestProjects.project_sign_image_id, TestProjects.project_sign_image_name = self.project.create_project(metadata = {"public": "false"}, **ADMIN_CLIENT)

View File

@ -25,7 +25,7 @@ class TestSBOMGeneration(unittest.TestCase):
self.user_password = "Aa123456"
self.project_id, self.project_name, self.user_id, self.user_name, self.repo_name1 = [None] * 5
self.user_id, self.user_name = self.user.create_user(user_password = self.user_password, **ADMIN_CLIENT)
self.USER_CLIENT = dict(with_signature = True, with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password, with_sbom_overview = True)
self.USER_CLIENT = dict(with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password, with_sbom_overview = True)
#2. Create a new private project(PA) by user(UA);

View File

@ -25,7 +25,7 @@ class TestScan(unittest.TestCase):
self.user_password = "Aa123456"
self.project_id, self.project_name, self.user_id, self.user_name, self.repo_name1 = [None] * 5
self.user_id, self.user_name = self.user.create_user(user_password = self.user_password, **ADMIN_CLIENT)
self.USER_CLIENT = dict(with_signature = True, with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password, with_scan_overview = True)
self.USER_CLIENT = dict(with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password, with_scan_overview = True)
#2. Create a new private project(PA) by user(UA);

View File

@ -27,7 +27,7 @@ class TestStopSBOMGeneration(unittest.TestCase):
self.user_password = "Aa123456"
self.project_id, self.project_name, self.user_id, self.user_name, self.repo_name1 = [None] * 5
self.user_id, self.user_name = self.user.create_user(user_password = self.user_password, **ADMIN_CLIENT)
self.USER_CLIENT = dict(with_signature = True, with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password, with_sbom_overview = True)
self.USER_CLIENT = dict(with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password, with_sbom_overview = True)
#2. Create a new private project(PA) by user(UA);

View File

@ -27,7 +27,7 @@ class TestStopScan(unittest.TestCase):
self.user_password = "Aa123456"
self.project_id, self.project_name, self.user_id, self.user_name, self.repo_name1 = [None] * 5
self.user_id, self.user_name = self.user.create_user(user_password = self.user_password, **ADMIN_CLIENT)
self.USER_CLIENT = dict(with_signature = True, with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password, with_scan_overview = True)
self.USER_CLIENT = dict(with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password, with_scan_overview = True)
#2. Create a new private project(PA) by user(UA);

View File

@ -27,7 +27,7 @@ class TestTagImmutability(unittest.TestCase):
self.tag_immutability = Tag_Immutability()
self.project_id, self.project_name, self.user_id, self.user_name = [None] * 4
self.user_id, self.user_name = self.user.create_user(user_password = self.user_password, **ADMIN_CLIENT)
self.USER_CLIENT = dict(with_signature = True, with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password)
self.USER_CLIENT = dict(with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password)
self.exsiting_rule = dict(selector_repository="rel*", selector_tag="v2.*")
self.project_id, self.project_name = self.project.create_project(metadata = {"public": "false"}, **self.USER_CLIENT)

View File

@ -23,7 +23,7 @@ class TestProjects(unittest.TestCase):
self.webhook= Webhook()
self.user_id, self.project_id = [None] * 2
self.user_id, self.user_name = self.user.create_user(user_password = self.user_password, **ADMIN_CLIENT)
self.USER_CLIENT = dict(with_signature = True, with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password)
self.USER_CLIENT = dict(with_immutable_status = True, endpoint = self.url, username = self.user_name, password = self.user_password)
@unittest.skipIf(TEARDOWN == True, "Test data won't be erased.")
def tearDown(self):

View File

@ -52,7 +52,7 @@ Should Not Contain Any Artifact
Get The Specific Artifact
[Arguments] ${project_name} ${repo_name} ${reference}
${cmd}= Set Variable curl -u ${HARBOR_ADMIN}:${HARBOR_PASSWORD} -s --insecure -H "Content-Type: application/json" -X GET "${HARBOR_URL}/api/v2.0/projects/${project_name}/repositories/${repo_name}/artifacts/${reference}?page=1&page_size=10&with_tag=true&with_label=true&with_scan_overview=true&with_accessory=true&with_signature=true&with_immutable_status=true"
${cmd}= Set Variable curl -u ${HARBOR_ADMIN}:${HARBOR_PASSWORD} -s --insecure -H "Content-Type: application/json" -X GET "${HARBOR_URL}/api/v2.0/projects/${project_name}/repositories/${repo_name}/artifacts/${reference}?page=1&page_size=10&with_tag=true&with_label=true&with_scan_overview=true&with_accessory=true&with_immutable_status=true"
${rc} ${output}= Run And Return Rc And Output ${cmd}
[Return] ${output}