From 28834fedf7251771034ed4845746d03044eaab12 Mon Sep 17 00:00:00 2001 From: wangyan Date: Mon, 6 Nov 2017 01:16:17 -0800 Subject: [PATCH] Add description for VIC 1.2 migration scripts --- tools/migration/export | 20 ++++++++++++++++++++ tools/migration/import | 20 ++++++++++++++++++++ tools/migration/mapprojects | 21 +++++++++++++++++++++ 3 files changed, 61 insertions(+) diff --git a/tools/migration/export b/tools/migration/export index 76f746193..8db251aaf 100755 --- a/tools/migration/export +++ b/tools/migration/export @@ -1,4 +1,24 @@ +// Copyright (c) 2017 VMware, Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #!/usr/bin/python + +""" +The script is to export the existing projects of Harbor into a file. +It's only for VIC 1.2 migration. +""" + import json import fileinput from optparse import OptionParser diff --git a/tools/migration/import b/tools/migration/import index 16bd81435..c96cc0e59 100755 --- a/tools/migration/import +++ b/tools/migration/import @@ -1,4 +1,24 @@ +// Copyright (c) 2017 VMware, Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #!/usr/bin/python + +""" +The script is to import the projects of source file into Admiral and save the results into mapprojectsfile. +It's only for VIC 1.2 migration. +""" + import json from optparse import OptionParser import os diff --git a/tools/migration/mapprojects b/tools/migration/mapprojects index 898919053..5b8a4ce12 100755 --- a/tools/migration/mapprojects +++ b/tools/migration/mapprojects @@ -1,6 +1,27 @@ +// Copyright (c) 2017 VMware, Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #!/usr/bin/python # -*- coding: utf-8 -*- +""" +The script is to map the project ID of Harbor and Admiral, and only for VIC 1.2 migration. + +In VIC 1.2, proejct is managed by Admiral rather than Harbor, as part of migration, +it needs to unify the proejct ID of Admiral and Harbor. +""" + import json import fileinput from optparse import OptionParser