From 511be25834f730483fc5cd9dcdb3f77216c2a2e2 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Wed, 20 Sep 2017 11:13:44 +0800 Subject: [PATCH] Show respect to original authors We copied some codes/frameworks from Nova, but frogot to add the original file informations, this tries to add them back. Change-Id: I310d94fc334b6e72dc5eafa316f1b4842066ccbe --- mogan/baremetal/ironic/driver.py | 6 ++++++ mogan/console/websocketproxy.py | 2 +- mogan/consoleauth/manager.py | 4 ++++ mogan/engine/configdrive.py | 4 ++++ mogan/engine/metadata.py | 4 ++++ mogan/network/api.py | 8 ++++++++ mogan/objects/aggregate.py | 10 +++++++--- mogan/objects/keypair.py | 6 +++++- mogan/objects/server_fault.py | 9 ++++++--- mogan/objects/server_group.py | 9 ++++++--- mogan/scheduler/client/report.py | 4 ++++ mogan/scheduler/filter_scheduler.py | 7 +++++++ 12 files changed, 62 insertions(+), 11 deletions(-) diff --git a/mogan/baremetal/ironic/driver.py b/mogan/baremetal/ironic/driver.py index db87bc51..fd9a6ea7 100644 --- a/mogan/baremetal/ironic/driver.py +++ b/mogan/baremetal/ironic/driver.py @@ -1,4 +1,6 @@ # Copyright 2016 Huawei Technologies Co.,LTD. +# Copyright 2014 Red Hat, Inc. +# Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -13,6 +15,10 @@ # License for the specific language governing permissions and limitations # under the License. +''' +Leverages nova/virt/ironic/driver.py +''' + import collections from ironicclient import exc as ironic_exc diff --git a/mogan/console/websocketproxy.py b/mogan/console/websocketproxy.py index 6a5cb815..1352a5d6 100644 --- a/mogan/console/websocketproxy.py +++ b/mogan/console/websocketproxy.py @@ -14,7 +14,7 @@ # under the License. ''' -Websocket proxy that is compatible with OpenStack Mogan. +Websocket proxy that is based on websocketproxy.py from Nova. Leverages websockify.py by Joel Martin ''' diff --git a/mogan/consoleauth/manager.py b/mogan/consoleauth/manager.py index 7fa0fae9..b6cd5072 100644 --- a/mogan/consoleauth/manager.py +++ b/mogan/consoleauth/manager.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +''' +Leverages nova/consoleauth/manager.py +''' + """Auth Components for Consoles.""" import time diff --git a/mogan/engine/configdrive.py b/mogan/engine/configdrive.py index 2a017a83..e5ddb2bf 100644 --- a/mogan/engine/configdrive.py +++ b/mogan/engine/configdrive.py @@ -13,6 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. +''' +Leverages nova/virt/configdrive.py by Michael Still +''' + """Config Drive v2 helper.""" import os diff --git a/mogan/engine/metadata.py b/mogan/engine/metadata.py index 00c62f48..a5fb6292 100644 --- a/mogan/engine/metadata.py +++ b/mogan/engine/metadata.py @@ -14,6 +14,10 @@ # License for the specific language governing permissions and limitations # under the License. +''' +Leverages nova/api/metadata.py +''' + """Server Metadata information.""" import posixpath diff --git a/mogan/network/api.py b/mogan/network/api.py index 887064d8..1aa49d82 100644 --- a/mogan/network/api.py +++ b/mogan/network/api.py @@ -1,3 +1,7 @@ +# Copyright 2012 OpenStack Foundation +# All Rights Reserved +# Copyright (c) 2012 NEC Corporation + # 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 @@ -10,6 +14,10 @@ # License for the specific language governing permissions and limitations # under the License. +''' +Leverages nova/network/neutronv2/api.py +''' + from neutronclient.common import exceptions as neutron_exceptions from neutronclient.v2_0 import client as clientv20 from oslo_log import log as logging diff --git a/mogan/objects/aggregate.py b/mogan/objects/aggregate.py index 7d64026a..091e6d0b 100644 --- a/mogan/objects/aggregate.py +++ b/mogan/objects/aggregate.py @@ -1,6 +1,6 @@ -# Copyright 2017 Huawei Technologies Co.,LTD. -# All Rights Reserved. -# +# Copyright 2017 Huawei Technologies Co.,LTD. +# Copyright 2013 IBM Corp. + # 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 @@ -13,6 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. +''' +Leverages nova/objects/aggregate.py +''' + from oslo_versionedobjects import base as object_base from mogan.db import api as dbapi diff --git a/mogan/objects/keypair.py b/mogan/objects/keypair.py index bc2ebb3d..5a0f18f1 100644 --- a/mogan/objects/keypair.py +++ b/mogan/objects/keypair.py @@ -1,4 +1,5 @@ -# Copyright 2017 Huawei Technologies Co.,LTD. +# Copyright 2017 Huawei Technologies Co.,LTD. +# Copyright 2013 IBM Corp. # # 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 @@ -12,6 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. +''' +Leverages nova/objects/keypair.py +''' from oslo_versionedobjects import base as object_base diff --git a/mogan/objects/server_fault.py b/mogan/objects/server_fault.py index 51707a2e..684e9387 100644 --- a/mogan/objects/server_fault.py +++ b/mogan/objects/server_fault.py @@ -1,6 +1,5 @@ -# Copyright 2017 Intel -# All Rights Reserved. -# +# Copyright 2017 Intel. +# Copyright 2013 IBM Corp. # # 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 @@ -14,6 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. +''' +Leverages nova/objects/instance_fault.py +''' + import itertools from oslo_versionedobjects import base as object_base diff --git a/mogan/objects/server_group.py b/mogan/objects/server_group.py index f9665f38..59f9b6bb 100644 --- a/mogan/objects/server_group.py +++ b/mogan/objects/server_group.py @@ -1,6 +1,5 @@ -# Copyright 2017 Huawei Technologies Co.,LTD. -# All Rights Reserved. -# +# Copyright 2017 Huawei Technologies Co.,LTD. +# Copyright (c) 2013 OpenStack Foundation # # 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 @@ -14,6 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. +''' +Leverages nova/objects/instance_group.py +''' + from oslo_log import log as logging from oslo_versionedobjects import base as object_base diff --git a/mogan/scheduler/client/report.py b/mogan/scheduler/client/report.py index 4c64d187..50377c55 100644 --- a/mogan/scheduler/client/report.py +++ b/mogan/scheduler/client/report.py @@ -13,6 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. +''' +Leverages nova/scheduler/client/report.py +''' + import functools import re import time diff --git a/mogan/scheduler/filter_scheduler.py b/mogan/scheduler/filter_scheduler.py index b1d8a9b3..c618cbc9 100644 --- a/mogan/scheduler/filter_scheduler.py +++ b/mogan/scheduler/filter_scheduler.py @@ -1,3 +1,6 @@ +# Copyright (c) 2011 OpenStack Foundation +# 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 @@ -10,6 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. +''' +Leverages nova/scheduler/filter_scheduler.py +''' + """The FilterScheduler is for creating servers. You can customize this scheduler by specifying your own node Filters and