From c8f82b1e3d38adffb71dead1dcfe8f3c630d7702 Mon Sep 17 00:00:00 2001 From: adriant Date: Wed, 27 Aug 2014 13:11:35 +1200 Subject: [PATCH] adding copyright and licensing Change-Id: Id0df9dff49a5f2f6dde523c57ef7bae61f85418d --- bin/web | 14 ++++++++++++++ bin/web.py | 14 ++++++++++++++ client/client.py | 14 ++++++++++++++ client/shell.py | 14 ++++++++++++++ distil/api/helpers.py | 14 ++++++++++++++ distil/api/web.py | 14 ++++++++++++++ distil/auth.py | 14 ++++++++++++++ distil/config.py | 13 +++++++++++++ distil/constants.py | 14 ++++++++++++++ distil/database.py | 14 ++++++++++++++ distil/helpers.py | 14 ++++++++++++++ distil/initdb.py | 14 ++++++++++++++ distil/interface.py | 14 ++++++++++++++ distil/models/__init__.py | 14 ++++++++++++++ distil/rates.py | 14 ++++++++++++++ distil/transformers.py | 14 ++++++++++++++ tests/__init__.py | 14 ++++++++++++++ tests/constants.py | 13 +++++++++++++ tests/data_samples.py | 14 ++++++++++++++ tests/helpers.py | 14 ++++++++++++++ tests/test_api.py | 14 ++++++++++++++ tests/test_database_module.py | 14 ++++++++++++++ tests/test_interface.py | 14 ++++++++++++++ tests/test_models.py | 14 ++++++++++++++ tests/test_transformers.py | 14 ++++++++++++++ 25 files changed, 348 insertions(+) diff --git a/bin/web b/bin/web index 6c9a3bb..9902527 100755 --- a/bin/web +++ b/bin/web @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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. + #!/bin/bash INSTALLED="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ORIGIN=`pwd` diff --git a/bin/web.py b/bin/web.py index 5f88059..aabb566 100644 --- a/bin/web.py +++ b/bin/web.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 from distil.api import web import yaml diff --git a/client/client.py b/client/client.py index 1b62547..d7ef4a3 100644 --- a/client/client.py +++ b/client/client.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 requests from requests.exceptions import ConnectionError import json diff --git a/client/shell.py b/client/shell.py index 25379ca..aee3c77 100644 --- a/client/shell.py +++ b/client/shell.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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/env python import os diff --git a/distil/api/helpers.py b/distil/api/helpers.py index 7defaf2..8c00fcc 100644 --- a/distil/api/helpers.py +++ b/distil/api/helpers.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 decorator import decorator import flask import itertools diff --git a/distil/api/web.py b/distil/api/web.py index 834f3a3..e055b54 100644 --- a/distil/api/web.py +++ b/distil/api/web.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 flask from flask import Flask, Blueprint from distil import database, config diff --git a/distil/auth.py b/distil/auth.py index 16f8597..d784c0f 100644 --- a/distil/auth.py +++ b/distil/auth.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 requests import json import urllib diff --git a/distil/config.py b/distil/config.py index 93e8c5f..58f6561 100644 --- a/distil/config.py +++ b/distil/config.py @@ -1,3 +1,16 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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. # This is simply a namespace for global config storage main = None diff --git a/distil/constants.py b/distil/constants.py index d27d3b8..8514084 100644 --- a/distil/constants.py +++ b/distil/constants.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 datetime import datetime # Date format Ceilometer uses diff --git a/distil/database.py b/distil/database.py index b93614c..c46ecad 100644 --- a/distil/database.py +++ b/distil/database.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 sqlalchemy import func from .models import Resource, UsageEntry, Tenant, SalesOrder, _Last_Run from distil.constants import dawn_of_time diff --git a/distil/helpers.py b/distil/helpers.py index f2ee1a6..9d95657 100644 --- a/distil/helpers.py +++ b/distil/helpers.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 novaclient.v1_1 import client from decimal import Decimal import config diff --git a/distil/initdb.py b/distil/initdb.py index 37ab920..0f88fc4 100644 --- a/distil/initdb.py +++ b/distil/initdb.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 models import Base from sqlalchemy import create_engine from sqlalchemy.pool import NullPool diff --git a/distil/interface.py b/distil/interface.py index f7adf5c..cbf92c3 100644 --- a/distil/interface.py +++ b/distil/interface.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 requests import json import auth diff --git a/distil/models/__init__.py b/distil/models/__init__.py index 467952f..a41ce5f 100644 --- a/distil/models/__init__.py +++ b/distil/models/__init__.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Text, DateTime, Numeric, ForeignKey from sqlalchemy import event, DDL, String, Integer diff --git a/distil/rates.py b/distil/rates.py index 1501e5d..84a7042 100644 --- a/distil/rates.py +++ b/distil/rates.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 decimal import Decimal import csv import logging as log diff --git a/distil/transformers.py b/distil/transformers.py index 07bf360..7a8792f 100644 --- a/distil/transformers.py +++ b/distil/transformers.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 datetime import constants import helpers diff --git a/tests/__init__.py b/tests/__init__.py index cca0b23..fc4b5b1 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 subprocess from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, scoped_session,create_session diff --git a/tests/constants.py b/tests/constants.py index ca875ce..568eaa5 100644 --- a/tests/constants.py +++ b/tests/constants.py @@ -1,3 +1,16 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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. DATABASE_NAME = "test_distil" diff --git a/tests/data_samples.py b/tests/data_samples.py index 8d29cff..e61c432 100644 --- a/tests/data_samples.py +++ b/tests/data_samples.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 os import json import decimal diff --git a/tests/helpers.py b/tests/helpers.py index ca8da0e..bf56688 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 mock from distil import models from datetime import timedelta diff --git a/tests/test_api.py b/tests/test_api.py index ddf2a60..414b61e 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 webtest import TestApp from . import test_interface, helpers, constants from distil.api import web diff --git a/tests/test_database_module.py b/tests/test_database_module.py index 77bd19f..f11fe53 100644 --- a/tests/test_database_module.py +++ b/tests/test_database_module.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 . import test_interface, helpers from distil import database from datetime import timedelta diff --git a/tests/test_interface.py b/tests/test_interface.py index dcfe963..1dae13b 100644 --- a/tests/test_interface.py +++ b/tests/test_interface.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 unittest from distil.models import Tenant as tenant_model from distil.models import UsageEntry, Resource, SalesOrder diff --git a/tests/test_models.py b/tests/test_models.py index b3d9615..821bced 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 unittest from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, create_session diff --git a/tests/test_transformers.py b/tests/test_transformers.py index 1a7ac0d..61232dd 100644 --- a/tests/test_transformers.py +++ b/tests/test_transformers.py @@ -1,3 +1,17 @@ +# Copyright (C) 2014 Catalyst IT Ltd +# +# 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 distil.transformers from distil import constants from distil.constants import states