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 c358038..9c26f92 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 6e8e020..9d28341 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 keystoneclient.v2_0.client import Client as Keystone from requests.exceptions import ConnectionError diff --git a/client/shell.py b/client/shell.py index 1099cdd..23f9190 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 b31e353..97ba192 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 dc5460b..f47feb5 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 d54be9c..b097391 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 b13533b..08e5cb8 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 a8d7992..5a62f2f 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 fe15485..f7369e2 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 6589b77..1852ef7 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, _Last_Run 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