Venu | Updated License

This commit is contained in:
new 2014-11-28 17:44:50 +05:30
parent b7be41a8d7
commit 87d5806d47
17 changed files with 234 additions and 9 deletions

View File

@ -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 <path to tempest repo>/etc/accounts.yaml` 3. `ln -s ~/nova/nova/virt/ec2/tempest/accounts.yaml <path to tempest repo>/etc/accounts.yaml`
\* In Amazons 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. \* In Amazons 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.

View File

@ -1,4 +1,19 @@
#!/usr/bin/env python #!/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 import os
def get_nova_creds(): def get_nova_creds():

View File

@ -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: class EC2GroupTransformer:
def to_group(self, ec2_group): def to_group(self, ec2_group):

View File

@ -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: class EC2RuleService:
def __init__(self, ec2_connection, ec2_rule_transformer): def __init__(self, ec2_connection, ec2_rule_transformer):

View File

@ -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 copy import deepcopy
from rule import Rule from rule import Rule

View File

@ -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 import os

View File

@ -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 # 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 # 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 # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # 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 # License for the specific language governing permissions and limitations
# under the License. # 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 from collections import defaultdict
aws_region = 'us-east-1' aws_region = 'us-east-1'

View File

@ -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 # 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 # 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 # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # 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 # License for the specific language governing permissions and limitations
# under the License. # under the License.ng to hold the values for being able
# This is the config file which is going to hold the values for being able
# to connect to the AWS Public cloud. # to connect to the AWS Public cloud.
from collections import defaultdict from collections import defaultdict
aws_region = "moto_region" aws_region = "moto_region"

View File

@ -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: class Group:
def rule_diff(self, other_group): def rule_diff(self, other_group):

View File

@ -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: class GroupRuleRefresher:
def __init__(self, ec2_connection, openstack_rule_service, ec2_rule_service): def __init__(self, ec2_connection, openstack_rule_service, ec2_rule_service):

View File

@ -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: class InstanceRuleRefresher:
def __init__(self, group_rule_refresher): def __init__(self, group_rule_refresher):

View File

@ -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(): class OpenstackGroupService():
def __init__(self, security_group_manager): def __init__(self, security_group_manager):

View File

@ -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: class OpenstackGroupTransformer:
def to_group(self, openstack_group): def to_group(self, openstack_group):
pass pass

View File

@ -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: class OpenstackRuleService:
def __init__(self, group_service, openstack_rule_transformer): def __init__(self, group_service, openstack_rule_transformer):
self.group_service = group_service self.group_service = group_service

View File

@ -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 copy import deepcopy
from rule import Rule from rule import Rule

15
rule.py
View File

@ -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: class Rule:
def __init__(self, ip_protocol, from_port, to_port, ip_range=None, group_name=None): def __init__(self, ip_protocol, from_port, to_port, ip_range=None, group_name=None):
self.ip_protocol = ip_protocol self.ip_protocol = ip_protocol

View File

@ -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: class RuleComparator:
def __init__(self, ec2_connection): def __init__(self, ec2_connection):
self.ec2_connection = ec2_connection self.ec2_connection = ec2_connection