diff --git a/README.md b/README.md index b3c00b7..716250f 100644 --- a/README.md +++ b/README.md @@ -101,3 +101,20 @@ The driver should now be loaded. The contents of the repository is mapped to `/o 3. `ln -s ~/nova/nova/virt/ec2/tempest/accounts.yaml /etc/accounts.yaml` \* In Amazon’s EC2 there is no concept of suspend and resume on instances. Therefore, we simply stop EC2 instances when suspended and start the instances when resumed, we do the same on pause and un-pause. + +###License + +# Copyright (c) 2014 ThoughtWorks +# 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. diff --git a/credentials.py b/credentials.py index 307f012..5399d99 100644 --- a/credentials.py +++ b/credentials.py @@ -1,4 +1,19 @@ #!/usr/bin/env python +# Copyright (c) 2014 ThoughtWorks +# 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. + import os def get_nova_creds(): diff --git a/ec2_group_transformer.py b/ec2_group_transformer.py index 5674d42..bd7e317 100644 --- a/ec2_group_transformer.py +++ b/ec2_group_transformer.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + class EC2GroupTransformer: def to_group(self, ec2_group): diff --git a/ec2_rule_service.py b/ec2_rule_service.py index ab07ff7..e2a4fdc 100644 --- a/ec2_rule_service.py +++ b/ec2_rule_service.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + class EC2RuleService: def __init__(self, ec2_connection, ec2_rule_transformer): diff --git a/ec2_rule_transformer.py b/ec2_rule_transformer.py index 5f32a3a..94e923a 100644 --- a/ec2_rule_transformer.py +++ b/ec2_rule_transformer.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + from copy import deepcopy from rule import Rule diff --git a/ec2driver_config.py b/ec2driver_config.py index 6092386..56ae37b 100644 --- a/ec2driver_config.py +++ b/ec2driver_config.py @@ -1,3 +1,17 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. import os diff --git a/ec2driver_standard_config.py b/ec2driver_standard_config.py index 1606d84..0fd3a19 100644 --- a/ec2driver_standard_config.py +++ b/ec2driver_standard_config.py @@ -1,4 +1,5 @@ -# Copyright (c) 2014 Thoughtworks. +# Copyright (c) 2014 ThoughtWorks +# 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 @@ -8,12 +9,10 @@ # # 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 expressed or implied. See the +# 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 the config file which is going to hold the values for being able -# to connect to the AWS Public cloud. from collections import defaultdict aws_region = 'us-east-1' diff --git a/ec2driver_test_config.py b/ec2driver_test_config.py index 1f4fd51..1c99932 100644 --- a/ec2driver_test_config.py +++ b/ec2driver_test_config.py @@ -1,4 +1,5 @@ -# Copyright (c) 2014 Thoughtworks. +# Copyright (c) 2014 ThoughtWorks +# 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 @@ -8,12 +9,11 @@ # # 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 expressed or implied. See the +# 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 the config file which is going to hold the values for being able +# under the License.ng to hold the values for being able # to connect to the AWS Public cloud. + from collections import defaultdict aws_region = "moto_region" diff --git a/group.py b/group.py index 978cfd5..a14eadb 100644 --- a/group.py +++ b/group.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + class Group: def rule_diff(self, other_group): diff --git a/group_rule_refresher.py b/group_rule_refresher.py index b473731..5d7431e 100644 --- a/group_rule_refresher.py +++ b/group_rule_refresher.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + class GroupRuleRefresher: def __init__(self, ec2_connection, openstack_rule_service, ec2_rule_service): diff --git a/instance_rule_refresher.py b/instance_rule_refresher.py index 03a0d70..b109b39 100644 --- a/instance_rule_refresher.py +++ b/instance_rule_refresher.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + class InstanceRuleRefresher: def __init__(self, group_rule_refresher): diff --git a/openstack_group_service.py b/openstack_group_service.py index 0b578f8..d5319bb 100644 --- a/openstack_group_service.py +++ b/openstack_group_service.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + class OpenstackGroupService(): def __init__(self, security_group_manager): diff --git a/openstack_group_transformer.py b/openstack_group_transformer.py index c1b2ad2..02fde86 100644 --- a/openstack_group_transformer.py +++ b/openstack_group_transformer.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + class OpenstackGroupTransformer: def to_group(self, openstack_group): pass \ No newline at end of file diff --git a/openstack_rule_service.py b/openstack_rule_service.py index 37765fe..5d2b4e4 100644 --- a/openstack_rule_service.py +++ b/openstack_rule_service.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + class OpenstackRuleService: def __init__(self, group_service, openstack_rule_transformer): self.group_service = group_service diff --git a/openstack_rule_transformer.py b/openstack_rule_transformer.py index 300198a..cbec57a 100644 --- a/openstack_rule_transformer.py +++ b/openstack_rule_transformer.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + from copy import deepcopy from rule import Rule diff --git a/rule.py b/rule.py index fc01ac8..2319ca7 100644 --- a/rule.py +++ b/rule.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + class Rule: def __init__(self, ip_protocol, from_port, to_port, ip_range=None, group_name=None): self.ip_protocol = ip_protocol diff --git a/rule_comparator.py b/rule_comparator.py index 1370f68..6337ed6 100644 --- a/rule_comparator.py +++ b/rule_comparator.py @@ -1,3 +1,18 @@ +# Copyright (c) 2014 ThoughtWorks +# 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. + class RuleComparator: def __init__(self, ec2_connection): self.ec2_connection = ec2_connection