From a304f5d2bb1c8b47fa44ce387e7184dc323d9fa3 Mon Sep 17 00:00:00 2001 From: WangFengTu Date: Fri, 24 Apr 2020 03:59:12 -0400 Subject: [PATCH] init registry module and fix copyright Signed-off-by: WangFengTu --- src/cutils/utils_aes.c | 10 ++++---- src/cutils/utils_aes.h | 10 ++++---- src/cutils/utils_base64.c | 10 ++++---- src/cutils/utils_base64.h | 10 ++++---- src/image/oci/oci_image.c | 9 +++++++ src/image/oci/registry/aes.c | 10 ++++---- src/image/oci/registry/aes.h | 10 ++++---- src/image/oci/registry/auths.c | 10 ++++---- src/image/oci/registry/auths.h | 10 ++++---- src/image/oci/registry/certs.c | 10 ++++---- src/image/oci/registry/certs.h | 10 ++++---- src/image/oci/registry/http_request.c | 10 ++++---- src/image/oci/registry/http_request.h | 10 ++++---- src/image/oci/registry/registry.c | 33 ++++++++++++++++++------- src/image/oci/registry/registry.h | 15 ++++++----- src/image/oci/registry/registry_apiv2.c | 10 ++++---- src/image/oci/registry/registry_apiv2.h | 10 ++++---- src/image/oci/registry/registry_type.h | 15 +++++++++++ 18 files changed, 125 insertions(+), 87 deletions(-) diff --git a/src/cutils/utils_aes.c b/src/cutils/utils_aes.c index 28d51f7..0a093ac 100644 --- a/src/cutils/utils_aes.c +++ b/src/cutils/utils_aes.c @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-26 * Description: provide base64 functions diff --git a/src/cutils/utils_aes.h b/src/cutils/utils_aes.h index d90d527..e90845b 100644 --- a/src/cutils/utils_aes.h +++ b/src/cutils/utils_aes.h @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-04-21 * Description: provide aes functions diff --git a/src/cutils/utils_base64.c b/src/cutils/utils_base64.c index 2d9ca45..1e66aaa 100644 --- a/src/cutils/utils_base64.c +++ b/src/cutils/utils_base64.c @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-26 * Description: provide base64 functions diff --git a/src/cutils/utils_base64.h b/src/cutils/utils_base64.h index fe77e43..28cf502 100644 --- a/src/cutils/utils_base64.h +++ b/src/cutils/utils_base64.h @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-26 * Description: provide base64 functions diff --git a/src/image/oci/oci_image.c b/src/image/oci/oci_image.c index fe85e9b..967423c 100644 --- a/src/image/oci/oci_image.c +++ b/src/image/oci/oci_image.c @@ -37,6 +37,7 @@ #include "isula_images_list.h" #include "isula_containers_list.h" #include "isula_storage_metadata.h" +#include "registry.h" #include "containers_store.h" #include "oci_images_store.h" @@ -95,12 +96,20 @@ out: int oci_init(const struct service_arguments *args) { int ret = -1; + registry_init_options options; if (args == NULL) { ERROR("Invalid image config"); return ret; } + options.use_decrypted_key = conf_get_use_decrypted_key_flag(); + options.skip_tls_verify = conf_get_skip_insecure_verify_flag(); + ret = registry_init(&options); + if (ret != 0) { + goto out; + } + if (storage_module_init_helper(args) != 0) { ret = -1; goto out; diff --git a/src/image/oci/registry/aes.c b/src/image/oci/registry/aes.c index 1bec6a8..00b59ac 100644 --- a/src/image/oci/registry/aes.c +++ b/src/image/oci/registry/aes.c @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-04-23 * Description: provide aes process functions diff --git a/src/image/oci/registry/aes.h b/src/image/oci/registry/aes.h index 8591899..8a01eca 100644 --- a/src/image/oci/registry/aes.h +++ b/src/image/oci/registry/aes.h @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-04-23 * Description: provide aes process definition diff --git a/src/image/oci/registry/auths.c b/src/image/oci/registry/auths.c index 2208210..f7edde1 100644 --- a/src/image/oci/registry/auths.c +++ b/src/image/oci/registry/auths.c @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-20 * Description: provide auths file process functions diff --git a/src/image/oci/registry/auths.h b/src/image/oci/registry/auths.h index 29ff21a..f35d27e 100644 --- a/src/image/oci/registry/auths.h +++ b/src/image/oci/registry/auths.h @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-20 * Description: provide auths file process definition diff --git a/src/image/oci/registry/certs.c b/src/image/oci/registry/certs.c index a45e72f..f20cf03 100644 --- a/src/image/oci/registry/certs.c +++ b/src/image/oci/registry/certs.c @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-20 * Description: provide auths file process functions diff --git a/src/image/oci/registry/certs.h b/src/image/oci/registry/certs.h index 26b457e..eb42fde 100644 --- a/src/image/oci/registry/certs.h +++ b/src/image/oci/registry/certs.h @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-20 * Description: provide certs file process definition diff --git a/src/image/oci/registry/http_request.c b/src/image/oci/registry/http_request.c index ab7169b..a66dd03 100644 --- a/src/image/oci/registry/http_request.c +++ b/src/image/oci/registry/http_request.c @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-20 * Description: provide http request functions diff --git a/src/image/oci/registry/http_request.h b/src/image/oci/registry/http_request.h index 629eeeb..2c0dde3 100644 --- a/src/image/oci/registry/http_request.h +++ b/src/image/oci/registry/http_request.h @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-05 * Description: provide http request definition diff --git a/src/image/oci/registry/registry.c b/src/image/oci/registry/registry.c index 776f01e..b9f9f3e 100644 --- a/src/image/oci/registry/registry.c +++ b/src/image/oci/registry/registry.c @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-02-27 * Description: provide registry functions @@ -39,6 +39,8 @@ #define MANIFEST_BIG_DATA_KEY "manifest" #define ROOTFS_TYPE "layers" +static registry_init_options g_options; + static int parse_manifest_schema1(pull_descriptor *desc) { registry_manifest_schema1 *manifest = NULL; @@ -1152,8 +1154,8 @@ static int prepare_pull_desc(pull_descriptor *desc, registry_pull_options *optio desc->dest_image_name = util_strdup_s(options->dest_image_name); desc->scope = util_strdup_s(scope); desc->blobpath = util_strdup_s(blobpath); - desc->use_decrypted_key = options->comm_opt.use_decrypted_key; - desc->skip_tls_verify = options->comm_opt.skip_tls_verify; + desc->use_decrypted_key = g_options.use_decrypted_key; + desc->skip_tls_verify = g_options.skip_tls_verify; if (options->auth.username != NULL && options->auth.password != NULL) { desc->username = util_strdup_s(options->auth.username); @@ -1227,6 +1229,19 @@ out: return ret; } +int registry_init(registry_init_options *options) +{ + if (options == NULL) { + ERROR("Invalid NULL param when init registry module"); + return -1; + } + + g_options.use_decrypted_key = options->use_decrypted_key; + g_options.skip_tls_verify = options->skip_tls_verify; + + return 0; +} + int registry_login(registry_login_options *options) { int ret = 0; @@ -1247,8 +1262,8 @@ int registry_login(registry_login_options *options) } desc->host = util_strdup_s(options->host); - desc->use_decrypted_key = options->comm_opt.use_decrypted_key; - desc->skip_tls_verify = options->comm_opt.skip_tls_verify; + desc->use_decrypted_key = g_options.use_decrypted_key; + desc->skip_tls_verify = g_options.skip_tls_verify; desc->username = util_strdup_s(options->auth.username); desc->password = util_strdup_s(options->auth.password); diff --git a/src/image/oci/registry/registry.h b/src/image/oci/registry/registry.h index 33c6873..1bfd09a 100644 --- a/src/image/oci/registry/registry.h +++ b/src/image/oci/registry/registry.h @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-02-27 * Description: provide registry definition @@ -22,7 +22,7 @@ extern "C" { typedef struct { bool use_decrypted_key; bool skip_tls_verify; -} registry_options; +} registry_init_options; typedef struct { char *username; @@ -30,18 +30,17 @@ typedef struct { } registry_auth; typedef struct { - registry_options comm_opt; registry_auth auth; char *image_name; char *dest_image_name; } registry_pull_options; typedef struct { - registry_options comm_opt; registry_auth auth; char *host; } registry_login_options; +int registry_init(registry_init_options *options); int registry_pull(registry_pull_options *options); int registry_login(registry_login_options *options); int registry_logout(char *host); diff --git a/src/image/oci/registry/registry_apiv2.c b/src/image/oci/registry/registry_apiv2.c index ef5bc10..381e81b 100644 --- a/src/image/oci/registry/registry_apiv2.c +++ b/src/image/oci/registry/registry_apiv2.c @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-05 * Description: provide registry api v2 functions diff --git a/src/image/oci/registry/registry_apiv2.h b/src/image/oci/registry/registry_apiv2.h index d66304d..f592b5b 100644 --- a/src/image/oci/registry/registry_apiv2.h +++ b/src/image/oci/registry/registry_apiv2.h @@ -1,13 +1,13 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. - * iSulad licensed under the Mulan PSL v1. - * You can use this software according to the terms and conditions of the Mulan PSL v1. - * You may obtain a copy of Mulan PSL v1 at: - * http://license.coscl.org.cn/MulanPSL + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR * PURPOSE. - * See the Mulan PSL v1 for more details. + * See the Mulan PSL v2 for more details. * Author: wangfengtu * Create: 2020-03-05 * Description: provide registry api v2 definition diff --git a/src/image/oci/registry/registry_type.h b/src/image/oci/registry/registry_type.h index 663f2bb..9b72737 100644 --- a/src/image/oci/registry/registry_type.h +++ b/src/image/oci/registry/registry_type.h @@ -1,3 +1,18 @@ +/****************************************************************************** + * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. + * iSulad licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR + * PURPOSE. + * See the Mulan PSL v2 for more details. + * Author: wangfengtu + * Create: 2020-04-23 + * Description: provide registry type definition + ******************************************************************************/ + #ifndef _IMAGE_REGISTRY_TYPE_H #define _IMAGE_REGISTRY_TYPE_H -- GitLab