From 2ae8bb55f89d111ee4f7da79cb03385523a95ee1 Mon Sep 17 00:00:00 2001 From: David Shrewsbury <=> Date: Thu, 13 Sep 2012 13:57:42 +0000 Subject: [PATCH] Add Apache2 license to source files. Move lib from lbaas to lbaas_worker. --- lbaas/__init__.py | 0 lbaas_worker/__init__.py | 13 +++++++++++++ {lbaas => lbaas_worker}/faults.py | 14 ++++++++++++++ {lbaas => lbaas_worker}/json_gearman.py | 14 ++++++++++++++ {lbaas => lbaas_worker}/worker.py | 16 +++++++++++++++- tests/test_lbaas_task.py | 2 +- 6 files changed, 57 insertions(+), 2 deletions(-) delete mode 100644 lbaas/__init__.py create mode 100644 lbaas_worker/__init__.py rename {lbaas => lbaas_worker}/faults.py (67%) rename {lbaas => lbaas_worker}/json_gearman.py (50%) rename {lbaas => lbaas_worker}/worker.py (81%) diff --git a/lbaas/__init__.py b/lbaas/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/lbaas_worker/__init__.py b/lbaas_worker/__init__.py new file mode 100644 index 00000000..582348cb --- /dev/null +++ b/lbaas_worker/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2012 Hewlett-Packard Development Company, L.P. +# +# 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. diff --git a/lbaas/faults.py b/lbaas_worker/faults.py similarity index 67% rename from lbaas/faults.py rename to lbaas_worker/faults.py index 15b62d0e..6802cca7 100644 --- a/lbaas/faults.py +++ b/lbaas_worker/faults.py @@ -1,3 +1,17 @@ +# Copyright 2012 Hewlett-Packard Development Company, L.P. +# +# 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. + from json import dumps diff --git a/lbaas/json_gearman.py b/lbaas_worker/json_gearman.py similarity index 50% rename from lbaas/json_gearman.py rename to lbaas_worker/json_gearman.py index 6a70da74..151b781c 100644 --- a/lbaas/json_gearman.py +++ b/lbaas_worker/json_gearman.py @@ -1,3 +1,17 @@ +# Copyright 2012 Hewlett-Packard Development Company, L.P. +# +# 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. + import json from gearman import GearmanWorker, DataEncoder diff --git a/lbaas/worker.py b/lbaas_worker/worker.py similarity index 81% rename from lbaas/worker.py rename to lbaas_worker/worker.py index 9b988542..6d84b286 100644 --- a/lbaas/worker.py +++ b/lbaas_worker/worker.py @@ -1,3 +1,17 @@ +# Copyright 2012 Hewlett-Packard Development Company, L.P. +# +# 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. + import argparse import daemon import json @@ -6,7 +20,7 @@ import logging import socket from json_gearman import JSONGearmanWorker -from lbaas.faults import BadRequest +from lbaas_worker.faults import BadRequest def lbaas_task(worker, job): diff --git a/tests/test_lbaas_task.py b/tests/test_lbaas_task.py index 4ca70023..12b6f401 100644 --- a/tests/test_lbaas_task.py +++ b/tests/test_lbaas_task.py @@ -1,6 +1,6 @@ import json import unittest -from lbaas.worker import lbaas_task +from lbaas_worker.worker import lbaas_task class FakeJob(object):