You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by se...@apache.org on 2015/05/05 15:25:54 UTC

[01/50] cloudstack-ec2stack git commit: Merge branch 'master' of github.com:BroganD1993/ec2stack

Repository: cloudstack-ec2stack
Updated Branches:
  refs/heads/master [created] 21d8b4b1d


Merge branch 'master' of github.com:BroganD1993/ec2stack


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/6f94bae9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/6f94bae9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/6f94bae9

Branch: refs/heads/master
Commit: 6f94bae96beb90f037c555e0d3e89a3b20d8fff3
Parents: 28d4ccf a549fdd
Author: BroganD1993 <da...@hotmail.com>
Authored: Sat Jul 5 21:24:15 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Sat Jul 5 21:24:15 2014 +0100

----------------------------------------------------------------------
 HISTORY.rst | 6 ++++++
 README.rst  | 8 ++++----
 setup.py    | 2 +-
 3 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------



[40/50] cloudstack-ec2stack git commit: Merge pull request #63 from ntavares/master

Posted by se...@apache.org.
Merge pull request #63 from ntavares/master

add support for --subnet-id

Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/95c18dea
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/95c18dea
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/95c18dea

Branch: refs/heads/master
Commit: 95c18deac2ec1729150b507a8b36bba65a7798f3
Parents: 1cbbfa6 272a98a
Author: Darren <da...@hotmail.com>
Authored: Thu Dec 4 11:52:09 2014 +0000
Committer: Darren <da...@hotmail.com>
Committed: Thu Dec 4 11:52:09 2014 +0000

----------------------------------------------------------------------
 ec2stack/providers/cloudstack/instances.py | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------



[26/50] cloudstack-ec2stack git commit: Add tests for invalid snapshot / volumes

Posted by se...@apache.org.
Add tests for invalid snapshot / volumes


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/f0a8c111
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/f0a8c111
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/f0a8c111

Branch: refs/heads/master
Commit: f0a8c1112a4936e046eeff07dfb576bcfe709bb5
Parents: 0aafa6d
Author: BroganD1993 <da...@hotmail.com>
Authored: Sun Aug 10 15:46:21 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Sun Aug 10 15:46:21 2014 +0100

----------------------------------------------------------------------
 tests/snapshot_tests.py | 47 +++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 44 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/f0a8c111/tests/snapshot_tests.py
----------------------------------------------------------------------
diff --git a/tests/snapshot_tests.py b/tests/snapshot_tests.py
index ec9a842..cfea1dc 100644
--- a/tests/snapshot_tests.py
+++ b/tests/snapshot_tests.py
@@ -33,6 +33,27 @@ class SnapshotTestCase(Ec2StackAppTestCase):
         self.assert_ok(response)
         assert 'CreateSnapshotResponse' in response.data
 
+    def test_create_snapshot_invalid_volume(self):
+        data = self.get_example_data()
+        data['Action'] = 'CreateSnapshot'
+        data['VolumeId'] = 'invalidvolumeid'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/invalid_create_snapshot_volume_not_found.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+
+        self.assert_bad_request(response)
+        assert 'InvalidVolume.NotFound' in response.data
+
     def test_describe_snapshots(self):
         data = self.get_example_data()
         data['Action'] = 'DescribeSnapshots'
@@ -71,7 +92,6 @@ class SnapshotTestCase(Ec2StackAppTestCase):
                 data=data
             )
 
-        print response.data
         self.assert_ok(response)
         assert 'DescribeSnapshotsResponse' in response.data
         assert 'examplesnapshot' in response.data
@@ -100,7 +120,7 @@ class SnapshotTestCase(Ec2StackAppTestCase):
     def test_delete_snapshot(self):
         data = self.get_example_data()
         data['Action'] = 'DeleteSnapshot'
-        data['SnapshotId'] = 'Test'
+        data['SnapshotId'] = 'snapshotid'
         data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
 
         get = mock.Mock()
@@ -116,4 +136,25 @@ class SnapshotTestCase(Ec2StackAppTestCase):
             )
 
         self.assert_ok(response)
-        assert 'DeleteSnapshotResponse' in response.data
\ No newline at end of file
+        assert 'DeleteSnapshotResponse' in response.data
+
+    def test_delete_snapshot(self):
+        data = self.get_example_data()
+        data['Action'] = 'DeleteSnapshot'
+        data['SnapshotId'] = 'invalidsnapshotid'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/invalid_delete_snapshot_snapshot_not_found.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+
+        self.assert_bad_request(response)
+        assert 'InvalidSnapshot.NotFound' in response.data
\ No newline at end of file


[09/50] cloudstack-ec2stack git commit: Add VPC tests

Posted by se...@apache.org.
Add VPC tests


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/6b91349e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/6b91349e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/6b91349e

Branch: refs/heads/master
Commit: 6b91349e17f82d5f466fba57908d23136aecfdfb
Parents: 174c798
Author: BroganD1993 <da...@hotmail.com>
Authored: Fri Jul 18 19:32:40 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Fri Jul 18 19:32:40 2014 +0100

----------------------------------------------------------------------
 ec2stack/providers/cloudstack/vpcs.py   |   7 +-
 tests/controller_tests.py               |   1 +
 tests/data/create_vpc_invalid_cidr.json |   8 +
 tests/data/valid_create_vpc.json        | 112 ++++++++++
 tests/data/valid_delete_vpc.json        |  16 ++
 tests/data/valid_describe_vpc.json      | 104 ++++++++++
 tests/data/valid_describe_vpcs.json     | 298 +++++++++++++++++++++++++++
 tests/settings.py                       |   1 +
 tests/vpc_tests.py                      | 136 ++++++++++++
 9 files changed, 679 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6b91349e/ec2stack/providers/cloudstack/vpcs.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/vpcs.py b/ec2stack/providers/cloudstack/vpcs.py
index 56b2e40..7386e3f 100644
--- a/ec2stack/providers/cloudstack/vpcs.py
+++ b/ec2stack/providers/cloudstack/vpcs.py
@@ -33,10 +33,9 @@ def _create_vpc_request():
     @return: Response.
     """
     args = {'command': 'createVPC'}
-    id = uuid.uuid1()
-    args['name'] = id
-    args['id'] = id
-    args['displaytext'] = id
+    name = uuid.uuid1()
+    args['name'] = name
+    args['displaytext'] = name
     args['zoneid'] = zones.get_zone(
         current_app.config['CLOUDSTACK_DEFAULT_ZONE'])['id']
     args['vpcofferingid'] = current_app.config['VPC_OFFERING_ID']

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6b91349e/tests/controller_tests.py
----------------------------------------------------------------------
diff --git a/tests/controller_tests.py b/tests/controller_tests.py
index ebb06cb..79be584 100644
--- a/tests/controller_tests.py
+++ b/tests/controller_tests.py
@@ -162,6 +162,7 @@ class ControllerTestCase(Ec2StackAppTestCase):
         data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
 
         get = mock.Mock()
+        get.return_value.text = '{}'
         get.return_value.status_code = 401
 
         with mock.patch('requests.get', get):

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6b91349e/tests/data/create_vpc_invalid_cidr.json
----------------------------------------------------------------------
diff --git a/tests/data/create_vpc_invalid_cidr.json b/tests/data/create_vpc_invalid_cidr.json
new file mode 100644
index 0000000..7d6c174
--- /dev/null
+++ b/tests/data/create_vpc_invalid_cidr.json
@@ -0,0 +1,8 @@
+{
+    "createvpcresponse": {
+        "errorcode": 431,
+        "uuidlist": [],
+        "cserrorcode": 4350,
+        "errortext": "Invalid CIDR specified 192.168.0.2/33"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6b91349e/tests/data/valid_create_vpc.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_create_vpc.json b/tests/data/valid_create_vpc.json
new file mode 100644
index 0000000..34f6d0d
--- /dev/null
+++ b/tests/data/valid_create_vpc.json
@@ -0,0 +1,112 @@
+{
+    "queryasyncjobresultresponse": {
+        "jobprocstatus": 0,
+        "created": "2014-07-17T20:07:33+0100",
+        "cmd": "org.apache.cloudstack.api.command.admin.vpc.CreateVPCCmdByAdmin",
+        "userid": "7c7fae5a-0d1c-11e4-9f4d-080027939f80",
+        "jobstatus": 1,
+        "jobid": "24158408-b62e-4592-a236-d1f5d27f0f02",
+        "jobresultcode": 0,
+        "jobresulttype": "object",
+        "jobresult": {
+            "vpc": {
+                "account": "admin",
+                "domainid": "7c7c7604-0d1c-11e4-9f4d-080027939f80",
+                "name": "9b68e9ac-0de5-11e4-8bc0-080027b0df8c",
+                "service": [
+                    {
+                        "name": "PortForwarding",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "StaticNat",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "SourceNat",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "UserData",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Dhcp",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "NetworkACL",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Dns",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Vpn",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Lb",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            },
+                            {
+                                "name": "InternalLbVm"
+                            }
+                        ]
+                    }
+                ],
+                "fordisplay": true,
+                "id": "af27429e-301c-458c-956b-b67e67c83e34",
+                "tags": [],
+                "domain": "ROOT",
+                "zoneid": "c0d14920-09ae-4943-9717-6ab6c0b52de1",
+                "regionlevelvpc": false,
+                "state": "Enabled",
+                "distributedvpcrouter": false,
+                "displaytext": "9b68e9ac-0de5-11e4-8bc0-080027b0df8c",
+                "networkdomain": "cs2sandbox.simulator",
+                "vpcofferingid": "feef70e6-4d3a-438e-98c4-814527f97850",
+                "cidr": "192.168.0.2/24",
+                "zonename": "Sandbox-simulator",
+                "restartrequired": false,
+                "network": []
+            }
+        },
+        "accountid": "7c7c8e5a-0d1c-11e4-9f4d-080027939f80"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6b91349e/tests/data/valid_delete_vpc.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_delete_vpc.json b/tests/data/valid_delete_vpc.json
new file mode 100644
index 0000000..780efca
--- /dev/null
+++ b/tests/data/valid_delete_vpc.json
@@ -0,0 +1,16 @@
+{
+    "queryasyncjobresultresponse": {
+        "jobprocstatus": 0,
+        "created": "2014-07-17T20:13:24+0100",
+        "cmd": "org.apache.cloudstack.api.command.user.vpc.DeleteVPCCmd",
+        "userid": "7c7fae5a-0d1c-11e4-9f4d-080027939f80",
+        "jobstatus": 1,
+        "jobid": "fa5b1c82-a52c-4d03-947e-3f371e8e02ad",
+        "jobresultcode": 0,
+        "jobresulttype": "object",
+        "jobresult": {
+            "success": true
+        },
+        "accountid": "7c7c8e5a-0d1c-11e4-9f4d-080027939f80"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6b91349e/tests/data/valid_describe_vpc.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_describe_vpc.json b/tests/data/valid_describe_vpc.json
new file mode 100644
index 0000000..408f568
--- /dev/null
+++ b/tests/data/valid_describe_vpc.json
@@ -0,0 +1,104 @@
+{
+    "listvpcsresponse": {
+        "count": 3,
+        "vpc": [
+            {
+                "account": "admin",
+                "domainid": "7c7c7604-0d1c-11e4-9f4d-080027939f80",
+                "name": "examplevpc",
+                "service": [
+                    {
+                        "name": "PortForwarding",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "StaticNat",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "SourceNat",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "UserData",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Dhcp",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "NetworkACL",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Dns",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Vpn",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Lb",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            },
+                            {
+                                "name": "InternalLbVm"
+                            }
+                        ]
+                    }
+                ],
+                "fordisplay": true,
+                "id": "examplevpc",
+                "tags": [],
+                "domain": "ROOT",
+                "zoneid": "c0d14920-09ae-4943-9717-6ab6c0b52de1",
+                "regionlevelvpc": false,
+                "state": "Enabled",
+                "distributedvpcrouter": false,
+                "displaytext": "9b68e9ac-0de5-11e4-8bc0-080027b0df8c",
+                "networkdomain": "cs2sandbox.simulator",
+                "vpcofferingid": "feef70e6-4d3a-438e-98c4-814527f97850",
+                "cidr": "192.168.0.2/24",
+                "zonename": "Sandbox-simulator",
+                "restartrequired": false,
+                "network": []
+            }
+        ]
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6b91349e/tests/data/valid_describe_vpcs.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_describe_vpcs.json b/tests/data/valid_describe_vpcs.json
new file mode 100644
index 0000000..171cbc3
--- /dev/null
+++ b/tests/data/valid_describe_vpcs.json
@@ -0,0 +1,298 @@
+{
+    "listvpcsresponse": {
+        "count": 3,
+        "vpc": [
+            {
+                "account": "admin",
+                "domainid": "7c7c7604-0d1c-11e4-9f4d-080027939f80",
+                "name": "9b68e9ac-0de5-11e4-8bc0-080027b0df8c",
+                "service": [
+                    {
+                        "name": "PortForwarding",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "StaticNat",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "SourceNat",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "UserData",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Dhcp",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "NetworkACL",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Dns",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Vpn",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Lb",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            },
+                            {
+                                "name": "InternalLbVm"
+                            }
+                        ]
+                    }
+                ],
+                "fordisplay": true,
+                "id": "af27429e-301c-458c-956b-b67e67c83e34",
+                "tags": [],
+                "domain": "ROOT",
+                "zoneid": "c0d14920-09ae-4943-9717-6ab6c0b52de1",
+                "regionlevelvpc": false,
+                "state": "Enabled",
+                "distributedvpcrouter": false,
+                "displaytext": "9b68e9ac-0de5-11e4-8bc0-080027b0df8c",
+                "networkdomain": "cs2sandbox.simulator",
+                "vpcofferingid": "feef70e6-4d3a-438e-98c4-814527f97850",
+                "cidr": "192.168.0.2/24",
+                "zonename": "Sandbox-simulator",
+                "restartrequired": false,
+                "network": []
+            },
+            {
+                "account": "admin",
+                "domainid": "7c7c7604-0d1c-11e4-9f4d-080027939f80",
+                "name": "d5768e4a-0de2-11e4-a8c4-080027b0df8c",
+                "service": [
+                    {
+                        "name": "PortForwarding",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "StaticNat",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "SourceNat",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "UserData",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Dhcp",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "NetworkACL",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Dns",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Vpn",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Lb",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            },
+                            {
+                                "name": "InternalLbVm"
+                            }
+                        ]
+                    }
+                ],
+                "fordisplay": true,
+                "id": "0a866c9d-4fc9-4d50-9c7c-9be9b060e18b",
+                "tags": [],
+                "domain": "ROOT",
+                "zoneid": "c0d14920-09ae-4943-9717-6ab6c0b52de1",
+                "regionlevelvpc": false,
+                "state": "Enabled",
+                "distributedvpcrouter": false,
+                "displaytext": "d5768e4a-0de2-11e4-a8c4-080027b0df8c",
+                "networkdomain": "cs2sandbox.simulator",
+                "vpcofferingid": "feef70e6-4d3a-438e-98c4-814527f97850",
+                "cidr": "192.168.0.2/24",
+                "zonename": "Sandbox-simulator",
+                "restartrequired": false,
+                "network": []
+            },
+            {
+                "account": "admin",
+                "domainid": "7c7c7604-0d1c-11e4-9f4d-080027939f80",
+                "name": "bd0eaaf4-0de2-11e4-a8c4-080027b0df8c",
+                "service": [
+                    {
+                        "name": "PortForwarding",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "StaticNat",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "SourceNat",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "UserData",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Dhcp",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "NetworkACL",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Dns",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Vpn",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            }
+                        ]
+                    },
+                    {
+                        "name": "Lb",
+                        "provider": [
+                            {
+                                "name": "VpcVirtualRouter"
+                            },
+                            {
+                                "name": "InternalLbVm"
+                            }
+                        ]
+                    }
+                ],
+                "fordisplay": true,
+                "id": "eb02c738-2a86-48c2-af3d-17a4ad13f597",
+                "tags": [],
+                "domain": "ROOT",
+                "zoneid": "c0d14920-09ae-4943-9717-6ab6c0b52de1",
+                "regionlevelvpc": false,
+                "state": "Enabled",
+                "distributedvpcrouter": false,
+                "displaytext": "bd0eaaf4-0de2-11e4-a8c4-080027b0df8c",
+                "networkdomain": "cs2sandbox.simulator",
+                "vpcofferingid": "feef70e6-4d3a-438e-98c4-814527f97850",
+                "cidr": "192.168.0.2/24",
+                "zonename": "Sandbox-simulator",
+                "restartrequired": false,
+                "network": []
+            }
+        ]
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6b91349e/tests/settings.py
----------------------------------------------------------------------
diff --git a/tests/settings.py b/tests/settings.py
index 49cbbd9..c96d52b 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -6,6 +6,7 @@ CLOUDSTACK_PROTOCOL = 'https'
 CLOUDSTACK_PATH = '/compute'
 CLOUDSTACK_CUSTOM_DISK_OFFERING = 'Custom'
 CLOUDSTACK_DEFAULT_ZONE = 'CH-GV2'
+VPC_OFFERING_ID = "OFFERINGID"
 
 INSTANCE_TYPE_MAP = {'m1.small': 'micro'}
 RESOURCE_TYPE_MAP = {'exampleresourceid': 'UserVm'}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6b91349e/tests/vpc_tests.py
----------------------------------------------------------------------
diff --git a/tests/vpc_tests.py b/tests/vpc_tests.py
new file mode 100644
index 0000000..5ed3a26
--- /dev/null
+++ b/tests/vpc_tests.py
@@ -0,0 +1,136 @@
+#!/usr/bin/env python
+# encoding: utf-8
+
+from base64 import b64encode
+
+import mock
+import json
+
+from ec2stack.helpers import read_file, generate_signature
+from . import Ec2StackAppTestCase
+
+
+class VpcTestCase(Ec2StackAppTestCase):
+
+    def test_create_vpc(self):
+        data = self.get_example_data()
+        data['Action'] = 'CreateVpc'
+        data['CidrBlock'] = '192.168.0.0/24'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get_zone = mock.Mock()
+        get_zone.return_value = json.loads(read_file(
+            'tests/data/zones_search.json'
+        ))
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_create_vpc.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            with mock.patch(
+                'ec2stack.providers.cloudstack.zones.get_zone',
+                get_zone
+            ):
+                response = self.post(
+                    '/',
+                    data=data
+                )
+
+        self.assert_ok(response)
+        assert 'CreateVpcResponse' in response.data
+
+    def test_create_vpc_invalid_cidr(self):
+        data = self.get_example_data()
+        data['Action'] = 'CreateVpc'
+        data['CidrBlock'] = '192.168.0.0/33'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get_zone = mock.Mock()
+        get_zone.return_value = json.loads(read_file(
+            'tests/data/zones_search.json'
+        ))
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/create_vpc_invalid_cidr.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            with mock.patch(
+                'ec2stack.providers.cloudstack.zones.get_zone',
+                get_zone
+            ):
+                response = self.post(
+                    '/',
+                    data=data
+                )
+
+        self.assert_bad_request(response)
+        assert 'InvalidVpcRange' in response.data
+
+    def test_describe_vpcs(self):
+        data = self.get_example_data()
+        data['Action'] = 'DescribeVpcs'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_describe_vpcs.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+
+        self.assert_ok(response)
+        assert 'DescribeVpcsResponse' in response.data
+
+    def test_describe_vpc_by_name(self):
+        data = self.get_example_data()
+        data['Action'] = 'DescribeVpcs'
+        data['VpcId'] = 'examplevpc'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_describe_vpc.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+        print response.data
+        self.assert_ok(response)
+        assert 'DescribeVpcsResponse' in response.data
+        assert 'examplevpc' in response.data
+
+    def test_delete_vpc(self):
+        data = self.get_example_data()
+        data['Action'] = 'DeleteVpc'
+        data['VpcId'] = 'Test'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_delete_vpc.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+
+        self.assert_ok(response)
+        assert 'DeleteVpcResponse' in response.data
\ No newline at end of file


[32/50] cloudstack-ec2stack git commit: Rename custom disk for simulated ssd backed instances

Posted by se...@apache.org.
Rename custom disk for simulated ssd backed instances


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/93358520
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/93358520
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/93358520

Branch: refs/heads/master
Commit: 9335852056251cea35d83f15a79f774f9e47fa67
Parents: 249834f
Author: brogand1993 <da...@hotmail.com>
Authored: Sun Aug 17 17:18:48 2014 +0100
Committer: brogand1993 <da...@hotmail.com>
Committed: Sun Aug 17 17:18:48 2014 +0100

----------------------------------------------------------------------
 ec2stack/configure.py                      |  8 ++++----
 ec2stack/providers/cloudstack/instances.py | 14 ++++++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/93358520/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index a80b70d..5c4ffee 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -169,13 +169,13 @@ def _set_optional_attributes_of_profile(config, profile):
     @return: configparser configuration.
     """
 
-    configure_instance_type_mapings = raw_input(
-        'Do you wish to input a local custom storage disk for instances? (Yes/No): '
+    configure_instance_disk = raw_input(
+        'Do you wish to input a second custom storage disk for instances? (Yes/No): '
     )
 
-    if configure_instance_type_mapings.lower() in ['yes', 'y']:
+    if configure_instance_disk.lower() in ['yes', 'y']:
         config = _set_attribute_of_profile(
-            config, profile, 'cloudstack_local_custom_disk_offering', 'Cloudstack custom local disk offering name', 'CustomLocal'
+            config, profile, 'cloudstack_instance_custom_disk_offering', 'Cloudstack custom instance disk offering name', 'CustomInstance'
         )
 
     configure_instance_type_mapings = raw_input(

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/93358520/ec2stack/providers/cloudstack/instances.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/instances.py b/ec2stack/providers/cloudstack/instances.py
index 84aa429..3e8115b 100644
--- a/ec2stack/providers/cloudstack/instances.py
+++ b/ec2stack/providers/cloudstack/instances.py
@@ -9,7 +9,7 @@ from flask import current_app
 
 from ec2stack.providers import cloudstack
 from ec2stack.providers.cloudstack import requester, service_offerings, zones, \
-    disk_offerings, volumes
+    disk_offerings
 from ec2stack import helpers, errors
 
 
@@ -178,9 +178,15 @@ def _run_instance_request():
     if helpers.get('BlockDeviceMapping.1.Ebs.VolumeType') is not None:
         disk_type = helpers.get('BlockDeviceMapping.1.Ebs.VolumeType')
         if disk_type == 'gp2':
-            args['diskofferingid'] = disk_offerings.get_disk_offering(
-                current_app.config['CLOUDSTACK_LOCAL_CUSTOM_DISK_OFFERING']
-            )['id']
+             if 'CLOUDSTACK_INSTANCE_CUSTOM_DISK_OFFERING' in current_app.config:
+                args['diskofferingid'] = disk_offerings.get_disk_offering(
+                    current_app.config['CLOUDSTACK_INSTANCE_CUSTOM_DISK_OFFERING']
+                )['id']
+             else:
+                errors.invalid_request(
+                    "Unable to configure secondary disk, please run ec2stack-configure and choose to "
+                    "configure an instance disk")
+
         if helpers.get('BlockDeviceMapping.1.Ebs.VolumeSize') is None:
             errors.invalid_request("VolumeSize not found in BlockDeviceMapping")
         else:


[35/50] cloudstack-ec2stack git commit: Update setup.py

Posted by se...@apache.org.
Update setup.py

update the project url for :http://github.com/BroganD1993/ec2stack

Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/dbc7c5d5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/dbc7c5d5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/dbc7c5d5

Branch: refs/heads/master
Commit: dbc7c5d56a033a0b69c006b57a2f2abbf41fb132
Parents: 1f4db26
Author: chunfeng <cl...@users.noreply.github.com>
Authored: Wed Nov 26 17:09:30 2014 -0800
Committer: chunfeng <cl...@users.noreply.github.com>
Committed: Wed Nov 26 17:09:30 2014 -0800

----------------------------------------------------------------------
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/dbc7c5d5/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 7fecfa3..b1d7e66 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@ def read_file(name):
 
 PROJECT = 'ec2stack'
 VERSION = '0.7.1'
-URL = 'http://github.com/imduffy15/ec2stack'
+URL = 'http://github.com/BroganD1993/ec2stack'
 AUTHOR = 'Darren Brogan, Ian Duffy'
 AUTHOR_EMAIL = 'brogand2@mail.dcu.ie, duffyi3@mail.dcu.ie'
 DESC = "EC2 compatibility interface for Apache Cloudstack"


[21/50] cloudstack-ec2stack git commit: Bump version

Posted by se...@apache.org.
Bump version


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/4a4fc3cc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/4a4fc3cc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/4a4fc3cc

Branch: refs/heads/master
Commit: 4a4fc3ccc8af0bfceff13c6d88a524dfed7cef38
Parents: 064531a
Author: BroganD1993 <da...@hotmail.com>
Authored: Thu Aug 7 18:43:24 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Thu Aug 7 18:43:24 2014 +0100

----------------------------------------------------------------------
 HISTORY.rst | 5 +++++
 setup.py    | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4a4fc3cc/HISTORY.rst
----------------------------------------------------------------------
diff --git a/HISTORY.rst b/HISTORY.rst
index 7b17ece..ed6e009 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,11 @@
 History
 =======
 
+0.6.1 (7-08-2014)
+_________________
+
+* Fix bug in VPC creation when ec2stack is configured with a basic zone
+
 0.6.0 (20-07-2014)
 __________________
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4a4fc3cc/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 5c4a7f8..a24d436 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ def read_file(name):
 
 
 PROJECT = 'ec2stack'
-VERSION = '0.6'
+VERSION = '0.6.1'
 URL = 'http://github.com/imduffy15/ec2stack'
 AUTHOR = 'Darren Brogan, Ian Duffy'
 AUTHOR_EMAIL = 'brogand2@mail.dcu.ie, duffyi3@mail.dcu.ie'


[47/50] cloudstack-ec2stack git commit: autopep8

Posted by se...@apache.org.
autopep8


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/4f12cfe1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/4f12cfe1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/4f12cfe1

Branch: refs/heads/master
Commit: 4f12cfe1da5e98dde510c084307610b728b24fdb
Parents: ee67d4d
Author: Ian Duffy <ia...@ianduffy.ie>
Authored: Mon Apr 13 14:42:18 2015 +0100
Committer: Ian Duffy <ia...@ianduffy.ie>
Committed: Mon Apr 13 14:42:18 2015 +0100

----------------------------------------------------------------------
 ec2stack/__init__.py                               | 10 ++++++----
 ec2stack/__main__.py                               |  4 ++--
 ec2stack/configure.py                              | 10 ++++++----
 ec2stack/controllers/__init__.py                   |  4 ++--
 ec2stack/controllers/default.py                    |  4 ++--
 ec2stack/core.py                                   |  4 ++--
 ec2stack/errors.py                                 |  4 ++--
 ec2stack/helpers.py                                |  7 ++++---
 ec2stack/models/__init__.py                        |  4 ++--
 ec2stack/models/users/__init__.py                  |  4 ++--
 ec2stack/models/users/models.py                    |  4 ++--
 ec2stack/providers/__init__.py                     |  4 ++--
 ec2stack/providers/cloudstack/__init__.py          |  4 ++--
 ec2stack/providers/cloudstack/disk_offerings.py    |  4 ++--
 ec2stack/providers/cloudstack/images.py            |  4 ++--
 ec2stack/providers/cloudstack/instances.py         |  7 ++++---
 ec2stack/providers/cloudstack/keypairs.py          |  4 ++--
 ec2stack/providers/cloudstack/passwords.py         |  4 ++--
 ec2stack/providers/cloudstack/requester.py         |  4 ++--
 ec2stack/providers/cloudstack/security_groups.py   |  4 ++--
 ec2stack/providers/cloudstack/service_offerings.py |  4 ++--
 ec2stack/providers/cloudstack/snapshots.py         |  4 ++--
 ec2stack/providers/cloudstack/tags.py              |  4 ++--
 ec2stack/providers/cloudstack/volumes.py           |  4 ++--
 ec2stack/providers/cloudstack/vpcs.py              |  4 ++--
 ec2stack/providers/cloudstack/zones.py             |  4 ++--
 ec2stack/secretkey_manager.py                      |  4 ++--
 ec2stack/services.py                               |  4 ++--
 migrations/env.py                                  |  4 ++--
 migrations/versions/1b1a5f6b42a_.py                |  4 ++--
 setup.py                                           |  4 ++--
 tests/__init__.py                                  |  4 ++--
 tests/controller_tests.py                          |  4 ++--
 tests/disk_offering_tests.py                       |  4 ++--
 tests/factories.py                                 |  4 ++--
 tests/images_tests.py                              |  4 ++--
 tests/instances_tests.py                           |  5 ++---
 tests/keypair_tests.py                             |  4 ++--
 tests/password_tests.py                            |  4 ++--
 tests/security_group_tests.py                      |  4 ++--
 tests/service_offering_tests.py                    |  4 ++--
 tests/settings.py                                  |  4 ++--
 tests/snapshot_tests.py                            |  6 +++---
 tests/tags_tests.py                                | 12 ++----------
 tests/utils.py                                     |  5 +++--
 tests/volume_tests.py                              |  4 ++--
 tests/vpc_tests.py                                 |  7 +++----
 tests/zones_tests.py                               |  4 ++--
 48 files changed, 111 insertions(+), 114 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/__init__.py b/ec2stack/__init__.py
index 7e04946..e9c3086 100644
--- a/ec2stack/__init__.py
+++ b/ec2stack/__init__.py
@@ -8,9 +8,9 @@
 #  to you 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
@@ -136,7 +136,8 @@ def _config_from_config_profile(config_file, profile, app):
     instance_section = profile + "instancemap"
     if config.has_section(instance_section):
         for attribute in config.options(instance_section):
-            instance_type_map[attribute] = config.get(instance_section, attribute)
+            instance_type_map[attribute] = config.get(
+                instance_section, attribute)
 
     app.config['INSTANCE_TYPE_MAP'] = instance_type_map
 
@@ -144,7 +145,8 @@ def _config_from_config_profile(config_file, profile, app):
     resource_section = profile + "resourcemap"
     if config.has_section(resource_section):
         for attribute in config.options(resource_section):
-            resource_type_map[attribute] = config.get(resource_section, attribute)
+            resource_type_map[attribute] = config.get(
+                resource_section, attribute)
 
     app.config['RESOURCE_TYPE_MAP '] = resource_type_map
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/__main__.py
----------------------------------------------------------------------
diff --git a/ec2stack/__main__.py b/ec2stack/__main__.py
index a1713e6..0bebc83 100644
--- a/ec2stack/__main__.py
+++ b/ec2stack/__main__.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index d2737ab..66ec338 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -8,9 +8,9 @@
 #  to you 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
@@ -60,7 +60,8 @@ def _create_config_file(config_folder):
     profile = args.pop('profile')
     advanced_network_enabled = args.pop('advanced')
     config_file_path = config_folder + '/ec2stack.conf'
-    config = _modify_config_profile(config_file_path, profile, advanced_network_enabled)
+    config = _modify_config_profile(
+        config_file_path, profile, advanced_network_enabled)
     config_file = open(config_file_path, 'w+')
     config.write(config_file)
 
@@ -277,7 +278,8 @@ def _set_attribute_of_profile(config, profile, attribute, message, default):
     if config.has_option(profile, attribute):
         default = config.get(profile, attribute)
 
-    attribute_value = _read_in_config_attribute_or_use_default(message, default)
+    attribute_value = _read_in_config_attribute_or_use_default(
+        message, default)
 
     config.set(profile, attribute, attribute_value)
     return config

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/controllers/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/controllers/__init__.py b/ec2stack/controllers/__init__.py
index 433ff99..fd6d741 100644
--- a/ec2stack/controllers/__init__.py
+++ b/ec2stack/controllers/__init__.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/controllers/default.py
----------------------------------------------------------------------
diff --git a/ec2stack/controllers/default.py b/ec2stack/controllers/default.py
index fcea349..476493c 100644
--- a/ec2stack/controllers/default.py
+++ b/ec2stack/controllers/default.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/core.py
----------------------------------------------------------------------
diff --git a/ec2stack/core.py b/ec2stack/core.py
index 1bdcc7d..26d00ac 100644
--- a/ec2stack/core.py
+++ b/ec2stack/core.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/errors.py
----------------------------------------------------------------------
diff --git a/ec2stack/errors.py b/ec2stack/errors.py
index 489e95e..d11169d 100644
--- a/ec2stack/errors.py
+++ b/ec2stack/errors.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/helpers.py
----------------------------------------------------------------------
diff --git a/ec2stack/helpers.py b/ec2stack/helpers.py
index 61c0afe..7399668 100644
--- a/ec2stack/helpers.py
+++ b/ec2stack/helpers.py
@@ -8,9 +8,9 @@
 #  to you 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
@@ -328,7 +328,8 @@ def successful_response(**kwargs):
     @return: Response.
     """
     api_version = str(get("Version"))
-    content = render_template(request_id=uuid(), api_version=api_version, **kwargs)
+    content = render_template(
+        request_id=uuid(), api_version=api_version, **kwargs)
     response = make_response(content)
     return _create_response(response, '200')
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/models/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/models/__init__.py b/ec2stack/models/__init__.py
index 4e7a34b..82854d5 100644
--- a/ec2stack/models/__init__.py
+++ b/ec2stack/models/__init__.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/models/users/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/models/users/__init__.py b/ec2stack/models/users/__init__.py
index 4d1b372..bdc9d1e 100644
--- a/ec2stack/models/users/__init__.py
+++ b/ec2stack/models/users/__init__.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/models/users/models.py
----------------------------------------------------------------------
diff --git a/ec2stack/models/users/models.py b/ec2stack/models/users/models.py
index f3f1458..c0a5c2e 100644
--- a/ec2stack/models/users/models.py
+++ b/ec2stack/models/users/models.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/__init__.py b/ec2stack/providers/__init__.py
index 434f3bf..f9424dd 100644
--- a/ec2stack/providers/__init__.py
+++ b/ec2stack/providers/__init__.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/__init__.py b/ec2stack/providers/cloudstack/__init__.py
index 357a27c..5b79bf8 100644
--- a/ec2stack/providers/cloudstack/__init__.py
+++ b/ec2stack/providers/cloudstack/__init__.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/disk_offerings.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/disk_offerings.py b/ec2stack/providers/cloudstack/disk_offerings.py
index 483d38d..8c2de44 100644
--- a/ec2stack/providers/cloudstack/disk_offerings.py
+++ b/ec2stack/providers/cloudstack/disk_offerings.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/images.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/images.py b/ec2stack/providers/cloudstack/images.py
index 109a082..fa6a618 100644
--- a/ec2stack/providers/cloudstack/images.py
+++ b/ec2stack/providers/cloudstack/images.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/instances.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/instances.py b/ec2stack/providers/cloudstack/instances.py
index 442834e..65e2e1c 100644
--- a/ec2stack/providers/cloudstack/instances.py
+++ b/ec2stack/providers/cloudstack/instances.py
@@ -8,9 +8,9 @@
 #  to you 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
@@ -201,7 +201,8 @@ def _run_instance_request():
             )['id']
 
         if helpers.get('BlockDeviceMapping.1.Ebs.VolumeSize') is None:
-            errors.invalid_request("VolumeSize not found in BlockDeviceMapping")
+            errors.invalid_request(
+                "VolumeSize not found in BlockDeviceMapping")
         else:
             args['size'] = helpers.get('BlockDeviceMapping.1.Ebs.VolumeSize')
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/keypairs.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/keypairs.py b/ec2stack/providers/cloudstack/keypairs.py
index 1b24b29..9e60eea 100644
--- a/ec2stack/providers/cloudstack/keypairs.py
+++ b/ec2stack/providers/cloudstack/keypairs.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/passwords.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/passwords.py b/ec2stack/providers/cloudstack/passwords.py
index 448ff83..39a0ab0 100644
--- a/ec2stack/providers/cloudstack/passwords.py
+++ b/ec2stack/providers/cloudstack/passwords.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/requester.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/requester.py b/ec2stack/providers/cloudstack/requester.py
index b53b097..c9896ff 100644
--- a/ec2stack/providers/cloudstack/requester.py
+++ b/ec2stack/providers/cloudstack/requester.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/security_groups.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/security_groups.py b/ec2stack/providers/cloudstack/security_groups.py
index ee3768c..49678c6 100644
--- a/ec2stack/providers/cloudstack/security_groups.py
+++ b/ec2stack/providers/cloudstack/security_groups.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/service_offerings.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/service_offerings.py b/ec2stack/providers/cloudstack/service_offerings.py
index 2f459b3..7b79368 100644
--- a/ec2stack/providers/cloudstack/service_offerings.py
+++ b/ec2stack/providers/cloudstack/service_offerings.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/snapshots.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/snapshots.py b/ec2stack/providers/cloudstack/snapshots.py
index cfaddd9..228be31 100644
--- a/ec2stack/providers/cloudstack/snapshots.py
+++ b/ec2stack/providers/cloudstack/snapshots.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/tags.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/tags.py b/ec2stack/providers/cloudstack/tags.py
index 68b35e7..759497b 100644
--- a/ec2stack/providers/cloudstack/tags.py
+++ b/ec2stack/providers/cloudstack/tags.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/volumes.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/volumes.py b/ec2stack/providers/cloudstack/volumes.py
index a677c37..63f5242 100644
--- a/ec2stack/providers/cloudstack/volumes.py
+++ b/ec2stack/providers/cloudstack/volumes.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/vpcs.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/vpcs.py b/ec2stack/providers/cloudstack/vpcs.py
index 959fe5f..3065c8a 100644
--- a/ec2stack/providers/cloudstack/vpcs.py
+++ b/ec2stack/providers/cloudstack/vpcs.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/providers/cloudstack/zones.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/zones.py b/ec2stack/providers/cloudstack/zones.py
index 0a80b32..18c1383 100644
--- a/ec2stack/providers/cloudstack/zones.py
+++ b/ec2stack/providers/cloudstack/zones.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/secretkey_manager.py
----------------------------------------------------------------------
diff --git a/ec2stack/secretkey_manager.py b/ec2stack/secretkey_manager.py
index ae55744..a60d202 100644
--- a/ec2stack/secretkey_manager.py
+++ b/ec2stack/secretkey_manager.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/ec2stack/services.py
----------------------------------------------------------------------
diff --git a/ec2stack/services.py b/ec2stack/services.py
index 927c3a9..bf1dbbd 100644
--- a/ec2stack/services.py
+++ b/ec2stack/services.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/migrations/env.py
----------------------------------------------------------------------
diff --git a/migrations/env.py b/migrations/env.py
index d3875bd..6acbb9d 100644
--- a/migrations/env.py
+++ b/migrations/env.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/migrations/versions/1b1a5f6b42a_.py
----------------------------------------------------------------------
diff --git a/migrations/versions/1b1a5f6b42a_.py b/migrations/versions/1b1a5f6b42a_.py
index adf42d6..658f695 100644
--- a/migrations/versions/1b1a5f6b42a_.py
+++ b/migrations/versions/1b1a5f6b42a_.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 274ceb9..79741b9 100644
--- a/setup.py
+++ b/setup.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/__init__.py
----------------------------------------------------------------------
diff --git a/tests/__init__.py b/tests/__init__.py
index 4965f77..55758ac 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/controller_tests.py
----------------------------------------------------------------------
diff --git a/tests/controller_tests.py b/tests/controller_tests.py
index 8ffc733..f8ca8cb 100644
--- a/tests/controller_tests.py
+++ b/tests/controller_tests.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/disk_offering_tests.py
----------------------------------------------------------------------
diff --git a/tests/disk_offering_tests.py b/tests/disk_offering_tests.py
index 05bc3db..5de400d 100644
--- a/tests/disk_offering_tests.py
+++ b/tests/disk_offering_tests.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/factories.py
----------------------------------------------------------------------
diff --git a/tests/factories.py b/tests/factories.py
index 25fda8d..9082796 100644
--- a/tests/factories.py
+++ b/tests/factories.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/images_tests.py
----------------------------------------------------------------------
diff --git a/tests/images_tests.py b/tests/images_tests.py
index dc1e84a..ba2e4d9 100644
--- a/tests/images_tests.py
+++ b/tests/images_tests.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/instances_tests.py
----------------------------------------------------------------------
diff --git a/tests/instances_tests.py b/tests/instances_tests.py
index 8cfa4f4..e057b82 100644
--- a/tests/instances_tests.py
+++ b/tests/instances_tests.py
@@ -8,9 +8,9 @@
 #  to you 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
@@ -444,7 +444,6 @@ class InstancesTestCase(Ec2StackAppTestCase):
         self.assert_bad_request(response)
         assert 'VolumeSize not found in BlockDeviceMapping' in response.data
 
-
     def test_run_instance_with_zone_and_type_(self):
         data = self.get_example_data()
         data['Action'] = 'RunInstances'

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/keypair_tests.py
----------------------------------------------------------------------
diff --git a/tests/keypair_tests.py b/tests/keypair_tests.py
index 42f8515..220edcf 100644
--- a/tests/keypair_tests.py
+++ b/tests/keypair_tests.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/password_tests.py
----------------------------------------------------------------------
diff --git a/tests/password_tests.py b/tests/password_tests.py
index 1b9de6f..38fe427 100644
--- a/tests/password_tests.py
+++ b/tests/password_tests.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/security_group_tests.py
----------------------------------------------------------------------
diff --git a/tests/security_group_tests.py b/tests/security_group_tests.py
index 6808ffc..f8065a8 100644
--- a/tests/security_group_tests.py
+++ b/tests/security_group_tests.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/service_offering_tests.py
----------------------------------------------------------------------
diff --git a/tests/service_offering_tests.py b/tests/service_offering_tests.py
index d13f859..1b19cb4 100644
--- a/tests/service_offering_tests.py
+++ b/tests/service_offering_tests.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/settings.py
----------------------------------------------------------------------
diff --git a/tests/settings.py b/tests/settings.py
index 34fafad..3c2bb43 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/snapshot_tests.py
----------------------------------------------------------------------
diff --git a/tests/snapshot_tests.py b/tests/snapshot_tests.py
index c0d95fb..765482a 100644
--- a/tests/snapshot_tests.py
+++ b/tests/snapshot_tests.py
@@ -8,9 +8,9 @@
 #  to you 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
@@ -175,4 +175,4 @@ class SnapshotTestCase(Ec2StackAppTestCase):
             )
 
         self.assert_bad_request(response)
-        assert 'InvalidSnapshot.NotFound' in response.data
\ No newline at end of file
+        assert 'InvalidSnapshot.NotFound' in response.data

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/tags_tests.py
----------------------------------------------------------------------
diff --git a/tests/tags_tests.py b/tests/tags_tests.py
index d769312..fdcfb30 100644
--- a/tests/tags_tests.py
+++ b/tests/tags_tests.py
@@ -8,9 +8,9 @@
 #  to you 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
@@ -36,7 +36,6 @@ class TagsTestCase(Ec2StackAppTestCase):
         data['Tag.1.value'] = 'examplevalue'
         data['ResourceId.1'] = 'exampleresourceid'
 
-
         data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
 
         get = mock.Mock()
@@ -61,7 +60,6 @@ class TagsTestCase(Ec2StackAppTestCase):
         data['Tag.1.value'] = 'examplevalue'
         data['ResourceId.1'] = 'exampleunconfigredresourceid'
 
-
         data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
 
         get = mock.Mock()
@@ -86,7 +84,6 @@ class TagsTestCase(Ec2StackAppTestCase):
         data['Tag.1.value'] = 'examplevalue'
         data['ResourceId.1'] = 'exampleresourceid'
 
-
         data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
 
         get = mock.Mock()
@@ -110,7 +107,6 @@ class TagsTestCase(Ec2StackAppTestCase):
         data['Tag.1.Key'] = 'examplekey'
         data['ResourceId.1'] = 'exampleresourceid'
 
-
         data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
 
         get = mock.Mock()
@@ -134,7 +130,6 @@ class TagsTestCase(Ec2StackAppTestCase):
         data['Tag.1.Key'] = 'examplekey'
         data['ResourceId.1'] = 'exampleunconfigredresourceid'
 
-
         data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
 
         get = mock.Mock()
@@ -158,7 +153,6 @@ class TagsTestCase(Ec2StackAppTestCase):
         data['Tag.1.Key'] = 'examplekey'
         data['ResourceId.1'] = 'exampleresourceid'
 
-
         data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
 
         get = mock.Mock()
@@ -216,5 +210,3 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         self.assert_ok(response)
         assert 'DescribeTagsResponse' in response.data
-
-

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/utils.py
----------------------------------------------------------------------
diff --git a/tests/utils.py b/tests/utils.py
index 0def948..cea67ca 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -8,9 +8,9 @@
 #  to you 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
@@ -19,6 +19,7 @@
 #  under the License.
 #
 
+
 class FlaskTestCaseMixin(object):
 
     @staticmethod

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/volume_tests.py
----------------------------------------------------------------------
diff --git a/tests/volume_tests.py b/tests/volume_tests.py
index 63bceaf..78df107 100644
--- a/tests/volume_tests.py
+++ b/tests/volume_tests.py
@@ -8,9 +8,9 @@
 #  to you 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

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/vpc_tests.py
----------------------------------------------------------------------
diff --git a/tests/vpc_tests.py b/tests/vpc_tests.py
index c238bc1..35d1a0d 100644
--- a/tests/vpc_tests.py
+++ b/tests/vpc_tests.py
@@ -8,9 +8,9 @@
 #  to you 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
@@ -131,7 +131,6 @@ class VpcTestCase(Ec2StackAppTestCase):
         assert 'DescribeVpcsResponse' in response.data
         assert 'examplevpc' in response.data
 
-
     def test_describe_vpc_by_name_invalid_name(self):
         data = self.get_example_data()
         data['Action'] = 'DescribeVpcs'
@@ -172,4 +171,4 @@ class VpcTestCase(Ec2StackAppTestCase):
             )
 
         self.assert_ok(response)
-        assert 'DeleteVpcResponse' in response.data
\ No newline at end of file
+        assert 'DeleteVpcResponse' in response.data

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4f12cfe1/tests/zones_tests.py
----------------------------------------------------------------------
diff --git a/tests/zones_tests.py b/tests/zones_tests.py
index d562271..2083eb2 100644
--- a/tests/zones_tests.py
+++ b/tests/zones_tests.py
@@ -8,9 +8,9 @@
 #  to you 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


[15/50] cloudstack-ec2stack git commit: Bump version, update HISTORY.rst

Posted by se...@apache.org.
Bump version, update HISTORY.rst


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/6322730d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/6322730d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/6322730d

Branch: refs/heads/master
Commit: 6322730dcf616398d4077fe7b670bc36763117b8
Parents: 9a837a5
Author: BroganD1993 <da...@hotmail.com>
Authored: Sun Jul 20 14:26:26 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Sun Jul 20 14:26:26 2014 +0100

----------------------------------------------------------------------
 HISTORY.rst | 20 +++++++++++++++-----
 setup.py    |  2 +-
 2 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6322730d/HISTORY.rst
----------------------------------------------------------------------
diff --git a/HISTORY.rst b/HISTORY.rst
index ebf313b..5e90e9e 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,9 +1,17 @@
 History
 =======
 
-0.5.0 (9-07-2014)
+0.6.0 (20-07-2014)
 __________________
 
+* Added support for vpc operations
+    * createVpc
+    * deleteVpc
+    * listVpc
+
+0.5.0 (9-07-2014)
+_________________
+
 * Add support for configuration profiles
 
     `$ ec2stack-configure --profile exampleprofile`
@@ -15,19 +23,21 @@ __________________
     `$ ec2stack --debug True`
 
 0.4.0 (9-06-2014)
-__________________
+_________________
 
 * Make api version used in responses dynamic
 
 
 0.3.0 (8-06-2014)
-__________________
+_________________
 
 * Added support for tag operations
-
+    * createTags
+    * deleteTags
+    * listTags
 
 0.2.0 (01-4-2014)
-__________________
+_________________
 
 * Change Amazon API support from 2013-10-15 to 2014-02-01
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/6322730d/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 9694b0e..68fd134 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ def read_file(name):
 
 
 PROJECT = 'ec2stack'
-VERSION = '0.5'
+VERSION = '0.6'
 URL = 'http://github.com/imduffy15/ec2stack'
 AUTHOR = 'Darren Brogan, Ian Duffy'
 AUTHOR_EMAIL = 'brogand2@mail.dcu.ie, duffyi3@mail.dcu.ie'


[43/50] cloudstack-ec2stack git commit: Possible solution to modify ec2stack-configure to be run non-interactively #62

Posted by se...@apache.org.
Possible solution to modify ec2stack-configure to be run non-interactively #62


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/2662cae3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/2662cae3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/2662cae3

Branch: refs/heads/master
Commit: 2662cae34cfd470b94893dbe9dab938d4f68d72e
Parents: 4d30d0e
Author: Ian Duffy <ia...@ianduffy.ie>
Authored: Fri Dec 5 05:21:08 2014 +0000
Committer: Ian Duffy <ia...@ianduffy.ie>
Committed: Fri Dec 5 05:21:08 2014 +0000

----------------------------------------------------------------------
 .deploy-coverage.sh    | 13 -------------
 .travis.yml            |  4 ----
 ec2stack/__init__.py   | 11 ++++++++++-
 ec2stack/configure.py  | 14 --------------
 migrations/alembic.ini |  6 +++---
 5 files changed, 13 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2662cae3/.deploy-coverage.sh
----------------------------------------------------------------------
diff --git a/.deploy-coverage.sh b/.deploy-coverage.sh
deleted file mode 100644
index 3c1d76b..0000000
--- a/.deploy-coverage.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-cd ../
-git config --global user.email "travisci@ianduffy.ie"
-git config --global user.name "travis-ci"
-git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/imduffy15/ec2stack gh-pages > /dev/null
-
-# Commit and Push the Changes
-cd gh-pages
-rm -rf *
-cp -Rf ../ec2stack/cover/* .
-git add -f .
-git commit -a -m "[AUTO-PUSH] Latest coverage report on successful travis build"
-git push -fq origin gh-pages > /dev/null

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2662cae3/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index a3cabb5..754e914 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,8 +14,4 @@ script:
 - pylint --rcfile=pylint.rc *.py ec2stack
 - nosetests --with-coverage --cover-erase --cover-package=ec2stack --cover-html
 after_success:
-- '[ "${TRAVIS_BRANCH}" = "master" ]  && bash .deploy-coverage.sh'
 - coveralls
-env:
-  global:
-    secure: dUNHx6q6ziCb7pXr/fb/OZS8fyB14RF8/rEEggBEzgn2L7KM78LVFyFNmW+QZ7lvJpZ806mfjdmvmz0DpR1k6kfokrr6txBzHDMEUebc9RnVnmsoNNWIRLiV/+YzUsVeFixogVz/z06yaycOC8knVExcNfGMfmiBg5PextydXSQ=

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2662cae3/ec2stack/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/__init__.py b/ec2stack/__init__.py
index 91ca81d..bb61d03 100644
--- a/ec2stack/__init__.py
+++ b/ec2stack/__init__.py
@@ -8,6 +8,9 @@ import os
 import sys
 import argparse
 
+from alembic import command
+from alembic.config import Config as AlembicConfig
+
 from flask import Flask
 from ConfigParser import SafeConfigParser
 
@@ -140,6 +143,12 @@ def _load_database():
     )
 
     if not os.path.exists(database_file):
-        sys.exit('No database found, please run ec2stack-configure')
+        directory = os.path.join(os.path.dirname(__file__), '../migrations')
+        config = AlembicConfig(os.path.join(
+            directory,
+            'alembic.ini'
+        ))
+        config.set_main_option('script_location', directory)
+        command.upgrade(config, 'head', sql=False, tag=None)
 
     return 'sqlite:///' + database_file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2662cae3/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index cc2e6f6..444d029 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -19,7 +19,6 @@ def main():
     """
     config_folder = _create_config_folder()
     _create_config_file(config_folder)
-    _create_database()
 
 
 def _create_config_folder():
@@ -281,16 +280,3 @@ def _read_in_config_attribute_or_use_default(message, default):
         attribute = default
 
     return attribute
-
-
-def _create_database():
-    """
-    Creates/Updates the database.
-    """
-    directory = os.path.join(os.path.dirname(__file__), '../migrations')
-    config = AlembicConfig(os.path.join(
-        directory,
-        'alembic.ini'
-    ))
-    config.set_main_option('script_location', directory)
-    command.upgrade(config, 'head', sql=False, tag=None)

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2662cae3/migrations/alembic.ini
----------------------------------------------------------------------
diff --git a/migrations/alembic.ini b/migrations/alembic.ini
index f8ed480..887d9d4 100644
--- a/migrations/alembic.ini
+++ b/migrations/alembic.ini
@@ -26,12 +26,12 @@ qualname =
 
 [logger_sqlalchemy]
 level = WARN
-handlers =
+handlers = console
 qualname = sqlalchemy.engine
 
 [logger_alembic]
-level = INFO
-handlers =
+level = WARN
+handlers = console
 qualname = alembic
 
 [handler_console]


[18/50] cloudstack-ec2stack git commit: Begin addition of snapshot support

Posted by se...@apache.org.
Begin addition of snapshot support


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/d027dfbf
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/d027dfbf
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/d027dfbf

Branch: refs/heads/master
Commit: d027dfbfb81ea761286ed21fe17e64eb13cbae24
Parents: 7c5417e
Author: BroganD1993 <da...@hotmail.com>
Authored: Wed Aug 6 19:03:18 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Wed Aug 6 19:03:18 2014 +0100

----------------------------------------------------------------------
 ec2stack/controllers/default.py            |   5 +-
 ec2stack/providers/cloudstack/snapshots.py | 123 ++++++++++++++++++++++++
 ec2stack/templates/create_snapshot.xml     |   8 ++
 ec2stack/templates/snapshots.xml           |  12 +++
 tests/data/valid_create_snapshot.json      |  25 +++++
 tests/data/valid_delete_snapshot.json      |  16 +++
 tests/data/valid_describe_snapshot.json    |  16 +++
 tests/data/valid_describe_snapshots.json   |  25 +++++
 tests/snapshot_tests.py                    | 118 +++++++++++++++++++++++
 9 files changed, 347 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/d027dfbf/ec2stack/controllers/default.py
----------------------------------------------------------------------
diff --git a/ec2stack/controllers/default.py b/ec2stack/controllers/default.py
index d0b05bd..4371c96 100644
--- a/ec2stack/controllers/default.py
+++ b/ec2stack/controllers/default.py
@@ -8,7 +8,7 @@ from ec2stack.helpers import get, error_response, \
 from ec2stack.core import Ec2stackError
 from ec2stack.services import USERS
 from ec2stack.providers.cloudstack import images, instances, keypairs, \
-    passwords, security_groups, zones, volumes, tags, vpcs
+    passwords, security_groups, zones, volumes, tags, vpcs, snapshots
 
 
 DEFAULT = Blueprint('default', __name__)
@@ -45,11 +45,13 @@ def _get_action(action):
         security_groups.authenticate_security_group_ingress,
         'CreateKeyPair': keypairs.create_keypair,
         'CreateSecurityGroup': security_groups.create_security_group,
+        'CreateSnapshot': snapshots.create_snapshot,
         'CreateTags': tags.create_tags,
         'CreateVolume': volumes.create_volume,
         'CreateVpc': vpcs.create_vpc,
         'DeleteKeyPair': keypairs.delete_keypair,
         'DeleteSecurityGroup': security_groups.delete_security_group,
+        'DeleteSnapshot': snapshots.delete_snapshot,
         'DeleteTags': tags.delete_tags,
         'DeleteVolume': volumes.delete_volume,
         'DeleteVpc': vpcs.delete_vpc,
@@ -60,6 +62,7 @@ def _get_action(action):
         'DescribeInstances': instances.describe_instances,
         'DescribeKeyPairs': keypairs.describe_keypairs,
         'DescribeSecurityGroups': security_groups.describe_security_groups,
+        'DescribeSnapshots': snapshots.describe_snapshots,
         'DescribeTags': tags.describe_tags,
         'DescribeVolumes': volumes.describe_volumes,
         'DescribeVpcs': vpcs.describe_vpcs,

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/d027dfbf/ec2stack/providers/cloudstack/snapshots.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/snapshots.py b/ec2stack/providers/cloudstack/snapshots.py
new file mode 100644
index 0000000..a75a5fb
--- /dev/null
+++ b/ec2stack/providers/cloudstack/snapshots.py
@@ -0,0 +1,123 @@
+#!/usr/bin/env python
+# encoding: utf-8
+
+"""This module contains functions for handling requests in relation to snapshots.
+"""
+
+import uuid
+
+from flask import current_app
+
+from ec2stack import errors
+from ec2stack import helpers
+from ec2stack.providers import cloudstack
+from ec2stack.providers.cloudstack import requester, zones
+
+
+@helpers.authentication_required
+def create_snapshot():
+    """
+    Create a snapshot.
+
+    @return: Response.
+    """
+    response = _create_snapshot_request()
+    return _create_snapshot_response(response)
+
+
+def _create_snapshot_request():
+    """
+    Request to create a snapshot.
+
+    @return: Response.
+    """
+    args = {'command': 'createSnapshot'}
+
+    response = requester.make_request_async(args)
+
+    return response
+
+
+def _create_snapshot_response(response):
+    """
+    Generates a response for create snapshot request.
+
+    @param response: Response from Cloudstack.
+    @return: Response.
+    """
+
+    response = response['snapshot']
+    return {
+        'template_name_or_list': 'create_snapshot.xml',
+        'response_type': 'CreateSnapshotResponse',
+        'response': response
+    }
+
+
+@helpers.authentication_required
+def delete_snapshot():
+    """
+    Delete a snapshot.
+
+    @return: Response.
+    """
+    helpers.require_parameters(['SnapshotId'])
+    _delete_snapshot_request()
+    return _delete_snapshot_response()
+
+
+def _delete_snapshot_request():
+    """
+    Request to delete a snapshot.
+
+    @return: Response.
+    """
+    args = {'command': 'deleteSnapshot', 'id': helpers.get('SnapshotId')}
+
+    response = requester.make_request_async(args)
+
+    return response
+
+
+def _delete_snapshot_response():
+    """
+    Generates a response for delete snapshot request.
+
+    @return: Response.
+    """
+    return {
+        'template_name_or_list': 'status.xml',
+        'response_type': 'DeleteSnapshotResponse',
+        'return': 'true'
+    }
+
+
+@helpers.authentication_required
+def describe_snapshots():
+    """
+    Describes a specific snapshot or all snapshots.
+
+    @return: Response.
+    """
+    args = {'command': 'listSnapshots'}
+    response = cloudstack.describe_item(
+        args, 'snapshot', errors.invalid_snapshot_id, 'SnapshotId'
+    )
+
+    return _describe_snapshot_response(
+        response
+    )
+
+
+def _describe_snapshot_response(response):
+    """
+    Generates a response for describe snapshot request.
+
+    @param response: Response from Cloudstack.
+    @return: Response.
+    """
+    return {
+        'template_name_or_list': 'snapshots.xml',
+        'response_type': 'DescribeSnapshotsResponse',
+        'response': response
+    }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/d027dfbf/ec2stack/templates/create_snapshot.xml
----------------------------------------------------------------------
diff --git a/ec2stack/templates/create_snapshot.xml b/ec2stack/templates/create_snapshot.xml
new file mode 100644
index 0000000..b7f6ce0
--- /dev/null
+++ b/ec2stack/templates/create_snapshot.xml
@@ -0,0 +1,8 @@
+{% extends "response.xml" %}
+{% block response_content %}
+   <snapshot>
+      <snapshotId>{{ response.id }}</snapshotId>
+      <volumeId>{{ snapshot.volumeid }}</volumeId>
+      <status>{{ response.state }}</status>
+   </snapshot>
+{% endblock %}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/d027dfbf/ec2stack/templates/snapshots.xml
----------------------------------------------------------------------
diff --git a/ec2stack/templates/snapshots.xml b/ec2stack/templates/snapshots.xml
new file mode 100644
index 0000000..d4a3cee
--- /dev/null
+++ b/ec2stack/templates/snapshots.xml
@@ -0,0 +1,12 @@
+{% extends "response.xml" %}
+{% block response_content %}
+    <snapshotSet>
+        {% for snapshot in response.snapshot %}
+        <item>
+            <snapshotId>{{ snapshot.id }}</snapshotId>
+            <volumeId>{{ snapshot.volumeid }}</volumeId>
+            <status>{{ response.state }}</status>
+        </item>
+        {% endfor %}
+    </snapshotSet>
+{% endblock %}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/d027dfbf/tests/data/valid_create_snapshot.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_create_snapshot.json b/tests/data/valid_create_snapshot.json
new file mode 100644
index 0000000..f8661cd
--- /dev/null
+++ b/tests/data/valid_create_snapshot.json
@@ -0,0 +1,25 @@
+{
+    "queryasyncjobresultresponse": {
+        "accountid": "f7ca69ba-1cd5-11e4-b589-080027ce083d",
+        "userid": "f7ca8d3c-1cd5-11e4-b589-080027ce083d",
+        "cmd": "org.apache.cloudstack.api.command.user.vmsnapshot.CreateVMSnapshotCmd",
+        "jobstatus": 1,
+        "jobprocstatus": 0,
+        "jobresultcode": 0,
+        "jobresulttype": "object",
+        "jobresult": {
+            "vmsnapshot": {
+                "id": "e0e04b84-6178-49a7-9d2f-a2cc6a82d4e4",
+                "name": "i-2-12-VM_VS_20140805203303",
+                "state": "Ready",
+                "displayname": "testsnapshot",
+                "virtualmachineid": "daa492b4-bd09-46b0-a4ad-142e187ecdbe",
+                "current": true,
+                "type": "Disk",
+                "created": "2014-08-05T21:33:04+0100"
+            }
+        },
+        "created": "2014-08-05T21:33:04+0100",
+        "jobid": "8f89700a-6bd0-4b4b-a3f9-272fff1e8fc7"
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/d027dfbf/tests/data/valid_delete_snapshot.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_delete_snapshot.json b/tests/data/valid_delete_snapshot.json
new file mode 100644
index 0000000..681b102
--- /dev/null
+++ b/tests/data/valid_delete_snapshot.json
@@ -0,0 +1,16 @@
+{
+    "queryasyncjobresultresponse": {
+        "accountid": "f7ca69ba-1cd5-11e4-b589-080027ce083d",
+        "userid": "f7ca8d3c-1cd5-11e4-b589-080027ce083d",
+        "cmd": "org.apache.cloudstack.api.command.user.vmsnapshot.DeleteVMSnapshotCmd",
+        "jobstatus": 1,
+        "jobprocstatus": 0,
+        "jobresultcode": 0,
+        "jobresulttype": "object",
+        "jobresult": {
+            "success": true
+        },
+        "created": "2014-08-05T21:37:50+0100",
+        "jobid": "f94a67b2-e389-4790-ae89-f19968d31318"
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/d027dfbf/tests/data/valid_describe_snapshot.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_describe_snapshot.json b/tests/data/valid_describe_snapshot.json
new file mode 100644
index 0000000..b4888a2
--- /dev/null
+++ b/tests/data/valid_describe_snapshot.json
@@ -0,0 +1,16 @@
+{
+    "listvmsnapshotresponse": {
+        "count": 1,
+        "vmSnapshot": [{
+            "id": "examplesnapshot",
+            "name": "i-2-12-VM_VS_20140805203432",
+            "state": "Ready",
+            "displayname": "testsnapshot1",
+            "virtualmachineid": "daa492b4-bd09-46b0-a4ad-142e187ecdbe",
+            "parentName": "testsnapshot",
+            "current": true,
+            "type": "Disk",
+            "created": "2014-08-05T21:34:32+0100"
+        }]
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/d027dfbf/tests/data/valid_describe_snapshots.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_describe_snapshots.json b/tests/data/valid_describe_snapshots.json
new file mode 100644
index 0000000..6753646
--- /dev/null
+++ b/tests/data/valid_describe_snapshots.json
@@ -0,0 +1,25 @@
+{
+    "listvmsnapshotresponse": {
+        "count": 2,
+        "vmSnapshot": [{
+            "id": "9f2f067f-3ae7-427d-95d9-3c338dcbd5a3",
+            "name": "i-2-12-VM_VS_20140805203432",
+            "state": "Ready",
+            "displayname": "testsnapshot1",
+            "virtualmachineid": "daa492b4-bd09-46b0-a4ad-142e187ecdbe",
+            "parentName": "testsnapshot",
+            "current": true,
+            "type": "Disk",
+            "created": "2014-08-05T21:34:32+0100"
+        }, {
+            "id": "e0e04b84-6178-49a7-9d2f-a2cc6a82d4e4",
+            "name": "i-2-12-VM_VS_20140805203303",
+            "state": "Ready",
+            "displayname": "testsnapshot",
+            "virtualmachineid": "daa492b4-bd09-46b0-a4ad-142e187ecdbe",
+            "current": false,
+            "type": "Disk",
+            "created": "2014-08-05T21:33:04+0100"
+        }]
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/d027dfbf/tests/snapshot_tests.py
----------------------------------------------------------------------
diff --git a/tests/snapshot_tests.py b/tests/snapshot_tests.py
new file mode 100644
index 0000000..a100252
--- /dev/null
+++ b/tests/snapshot_tests.py
@@ -0,0 +1,118 @@
+#!/usr/bin/env python
+# encoding: utf-8
+
+from base64 import b64encode
+
+import mock
+import json
+
+from ec2stack.helpers import read_file, generate_signature
+from . import Ec2StackAppTestCase
+
+
+class SnapshotTestCase(Ec2StackAppTestCase):
+
+    def test_create_snapshot(self):
+        data = self.get_example_data()
+        data['Action'] = 'CreateSnapshot'
+        data['VolumeId'] = 'daa492b4-bd09-46b0-a4ad-142e187ecdbe'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_create_snapshot.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+
+        self.assert_ok(response)
+        assert 'CreateSnapshotResponse' in response.data
+
+    def test_describe_snapshots(self):
+        data = self.get_example_data()
+        data['Action'] = 'DescribeSnapshots'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_describe_snapshots.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+
+        self.assert_ok(response)
+        assert 'DescribeSnapshotsResponse' in response.data
+
+    def test_describe_snapshot_by_name(self):
+        data = self.get_example_data()
+        data['Action'] = 'DescribeVpcs'
+        data['SnapshotId'] = 'examplesnapshot'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_describe_snapshot.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+
+        self.assert_ok(response)
+        assert 'DescribeSnapshotsResponse' in response.data
+        assert 'examplesnapshot' in response.data
+
+    def test_describe_snapshot_by_name_invalid_name(self):
+        data = self.get_example_data()
+        data['Action'] = 'DescribeVpcs'
+        data['SnapshotId'] = 'invalidsnapshot'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_describe_snapshot.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+
+        self.assert_bad_request(response)
+        assert 'InvalidSnapshotID.NotFound' in response.data
+
+    def test_delete_snapshot(self):
+        data = self.get_example_data()
+        data['Action'] = 'DeleteSnapshot'
+        data['SnapshotId'] = 'Test'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_delete_snapshot.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+
+        self.assert_ok(response)
+        assert 'DeleteSnapshotResponse' in response.data
\ No newline at end of file


[48/50] cloudstack-ec2stack git commit: fix pep8 issues

Posted by se...@apache.org.
fix pep8 issues


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/882dc5fd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/882dc5fd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/882dc5fd

Branch: refs/heads/master
Commit: 882dc5fd52f50ba65c8ef8db3b90547141f957b1
Parents: 4f12cfe
Author: Ian Duffy <ia...@ianduffy.ie>
Authored: Mon Apr 13 14:49:47 2015 +0100
Committer: Ian Duffy <ia...@ianduffy.ie>
Committed: Mon Apr 13 14:49:47 2015 +0100

----------------------------------------------------------------------
 ec2stack/__init__.py  | 4 +---
 ec2stack/configure.py | 3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/882dc5fd/ec2stack/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/__init__.py b/ec2stack/__init__.py
index e9c3086..1e5b729 100644
--- a/ec2stack/__init__.py
+++ b/ec2stack/__init__.py
@@ -125,9 +125,7 @@ def _config_from_config_profile(config_file, profile, app):
     config.read(config_file)
 
     if not config.has_section(profile):
-        sys.exit('No profile matching ' + profile
-                 + ' found in configuration, please run ec2stack-configure -p '
-                 + profile)
+        sys.exit('No profile matching ' + profile + ' found in configuration, please run ec2stack-configure -p ' + profile)
 
     for attribute in config.options(profile):
         app.config[attribute.upper()] = config.get(profile, attribute)

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/882dc5fd/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index 66ec338..9255c1d 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -192,8 +192,7 @@ def _set_optional_attributes_of_profile(config, profile):
         config = _read_user_instance_mappings(config, profile)
 
     configure_resource_type_mapings = raw_input(
-        'Do you wish to input resource type to resource id mappings'
-        + ' for tag support? (Yes/No): '
+        'Do you wish to input resource type to resource id mappings' + ' for tag support? (Yes/No): '
     )
 
     if configure_resource_type_mapings.lower() in ['yes', 'y']:


[13/50] cloudstack-ec2stack git commit: Rename test data to uniform filename format

Posted by se...@apache.org.
Rename test data to uniform filename format


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/343f3273
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/343f3273
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/343f3273

Branch: refs/heads/master
Commit: 343f3273e968c313399d146941c2372b189d686e
Parents: 44fb5bd
Author: BroganD1993 <da...@hotmail.com>
Authored: Sun Jul 20 14:18:10 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Sun Jul 20 14:18:10 2014 +0100

----------------------------------------------------------------------
 tests/data/authorize_security_group_egress.json | 32 -----------------
 .../data/authorize_security_group_ingress.json  | 32 -----------------
 tests/data/create_tag.json                      | 16 ---------
 ...create_volume_invalid_snapshot_response.json |  8 -----
 tests/data/create_volume_response.json          | 38 --------------------
 tests/data/create_vpc_invalid_cidr.json         |  8 -----
 tests/data/delete_keypair.json                  |  3 --
 tests/data/delete_tag.json                      | 16 ---------
 tests/data/delete_volume_response.json          |  5 ---
 ...plicate_authorize_security_group_egress.json | 15 --------
 ...licate_authorize_security_group_ingress.json | 15 --------
 tests/data/duplicate_create_keypair.json        |  5 ---
 tests/data/duplicate_create_security_group.json |  7 ----
 tests/data/duplicate_import_keypair.json        |  7 ----
 ...thorize_security_group_egress_duplicate.json | 15 ++++++++
 ...horize_security_group_ingress_duplicate.json | 15 ++++++++
 .../data/invalid_create_keypair_duplicate.json  |  5 +++
 ...invalid_create_security_group_duplicate.json |  7 ++++
 tests/data/invalid_create_tag.json              | 17 ---------
 tests/data/invalid_create_tag_invalid_id.json   | 17 +++++++++
 ...create_volume_invalid_snapshot_response.json |  8 +++++
 tests/data/invalid_create_vpc_invalid_cidr.json |  8 +++++
 tests/data/invalid_delete_tag.json              | 17 ---------
 .../data/invalid_delete_tag_invalid_tag_id.json | 17 +++++++++
 ...invalid_delete_volume_invalid_volume_id.json |  8 +++++
 ...invalid_describe_image_invalid_image_id.json |  8 +++++
 ...lid_describe_volume_invalid_instance_id.json |  3 ++
 tests/data/invalid_image_id.json                |  8 -----
 .../data/invalid_import_keypair_duplicate.json  |  7 ++++
 tests/data/invalid_instance_id.json             |  3 --
 tests/data/invalid_volume_id.json               |  8 -----
 tests/data/list_tags.json                       | 25 -------------
 .../valid_authorize_security_group_egress.json  | 32 +++++++++++++++++
 .../valid_authorize_security_group_ingress.json | 32 +++++++++++++++++
 tests/data/valid_create_tag.json                | 16 +++++++++
 tests/data/valid_create_volume_response.json    | 38 ++++++++++++++++++++
 tests/data/valid_delete_keypair.json            |  3 ++
 tests/data/valid_delete_tag.json                | 16 +++++++++
 tests/data/valid_delete_volume_response.json    |  5 +++
 tests/data/valid_describe_tags.json             | 25 +++++++++++++
 tests/disk_offering_tests.py                    |  2 +-
 tests/keypair_tests.py                          |  6 ++--
 tests/security_group_tests.py                   | 12 +++----
 tests/tags_tests.py                             | 18 +++++-----
 tests/volume_tests.py                           | 10 +++---
 tests/vpc_tests.py                              |  4 +--
 tests/zones_tests.py                            |  2 +-
 47 files changed, 311 insertions(+), 313 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/authorize_security_group_egress.json
----------------------------------------------------------------------
diff --git a/tests/data/authorize_security_group_egress.json b/tests/data/authorize_security_group_egress.json
deleted file mode 100644
index 4042974..0000000
--- a/tests/data/authorize_security_group_egress.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{ "queryasyncjobresultresponse": {
-    "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d",
-    "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
-    "cmd": "org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupEgressCmd",
-    "jobstatus": 1,
-    "jobprocstatus": 0,
-    "jobresultcode": 0,
-    "jobresulttype": "object",
-    "jobresult": {
-        "securitygroup": {
-            "id": "01104a6a-bd3c-4804-86fd-1ca6231f128d",
-            "name": "test5",
-            "description": "test5",
-            "account": "test",
-            "domainid": "2edae3e4-95e4-11e3-b2e4-d19c9d3e5e1d",
-            "domain": "ROOT",
-            "ingressrule": [],
-            "egressrule": [
-                {
-                    "ruleid": "1ff7ed29-d75a-47ad-a82a-da57da8d679e",
-                    "protocol": "tcp",
-                    "startport": 1000,
-                    "endport": 1024,
-                    "cidr": "0.0.0.0/0"
-                }
-            ],
-            "tags": []
-        }
-    },
-    "created": "2014-02-26T23:22:50+0000",
-    "jobid": "c72d64f5-062e-48ca-8ea5-8fe71987673a"
-} }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/authorize_security_group_ingress.json
----------------------------------------------------------------------
diff --git a/tests/data/authorize_security_group_ingress.json b/tests/data/authorize_security_group_ingress.json
deleted file mode 100644
index 5b20e71..0000000
--- a/tests/data/authorize_security_group_ingress.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{ "queryasyncjobresultresponse": {
-    "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d",
-    "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
-    "cmd": "org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupIngressCmd",
-    "jobstatus": 1,
-    "jobprocstatus": 0,
-    "jobresultcode": 0,
-    "jobresulttype": "object",
-    "jobresult": {
-        "securitygroup": {
-            "id": "01104a6a-bd3c-4804-86fd-1ca6231f128d",
-            "name": "test5",
-            "description": "test5",
-            "account": "test",
-            "domainid": "2edae3e4-95e4-11e3-b2e4-d19c9d3e5e1d",
-            "domain": "ROOT",
-            "ingressrule": [
-                {
-                    "ruleid": "739f53a3-ce50-4790-a86d-1051f77dd3d2",
-                    "protocol": "tcp",
-                    "startport": 1000,
-                    "endport": 1024,
-                    "cidr": "0.0.0.0/0"
-                }
-            ],
-            "egressrule": [],
-            "tags": []
-        }
-    },
-    "created": "2014-02-26T23:05:55+0000",
-    "jobid": "ed5d7cc6-776a-4fda-b4c4-b71421b56c82"
-} }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/create_tag.json
----------------------------------------------------------------------
diff --git a/tests/data/create_tag.json b/tests/data/create_tag.json
deleted file mode 100644
index 9680fb5..0000000
--- a/tests/data/create_tag.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-    "queryasyncjobresultresponse": {
-        "jobprocstatus": 0,
-        "created": "2014-06-01T12:00:56+0200",
-        "cmd": "org.apache.cloudstack.api.command.user.tag.CreateTagsCmd",
-        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
-        "jobstatus": 1,
-        "jobid": "036bf202-6fe5-4b73-8823-d9e22cd3c63f",
-        "jobresultcode": 0,
-        "jobresulttype": "object",
-        "jobresult": {
-            "success": true
-        },
-        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/create_volume_invalid_snapshot_response.json
----------------------------------------------------------------------
diff --git a/tests/data/create_volume_invalid_snapshot_response.json b/tests/data/create_volume_invalid_snapshot_response.json
deleted file mode 100644
index 3d2b58e..0000000
--- a/tests/data/create_volume_invalid_snapshot_response.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "createvolumeresponse": {
-        "errorcode": 431,
-        "uuidlist": [],
-        "cserrorcode": 4350,
-        "errortext": "unable to find a snapshot with id 45"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/create_volume_response.json
----------------------------------------------------------------------
diff --git a/tests/data/create_volume_response.json b/tests/data/create_volume_response.json
deleted file mode 100644
index 79826ba..0000000
--- a/tests/data/create_volume_response.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-    "queryasyncjobresultresponse": {
-        "jobprocstatus": 0,
-        "created": "2014-02-25T19:46:35+0000",
-        "cmd": "org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd",
-        "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
-        "jobstatus": 1,
-        "jobid": "1f32404b-d067-43e8-8835-4cc1c55d737a",
-        "jobresultcode": 0,
-        "jobresulttype": "object",
-        "jobresult": {
-            "volume": {
-                "size": 10737418240,
-                "diskofferingname": "Custom",
-                "account": "admin",
-                "domainid": "2edae3e4-95e4-11e3-b2e4-d19c9d3e5e1d",
-                "name": "f0e2a699-1196-49bd-90cd-af809f4c32ea",
-                "created": "2014-02-25T19:46:34+0000",
-                "storagetype": "shared",
-                "type": "DATADISK",
-                "tags": [],
-                "domain": "ROOT",
-                "jobstatus": 0,
-                "jobid": "1f32404b-d067-43e8-8835-4cc1c55d737a",
-                "destroyed": false,
-                "state": "Allocated",
-                "diskofferingdisplaytext": "Custom Disk",
-                "isextractable": true,
-                "displayvolume": true,
-                "zoneid": "1e47a2fc-61c7-401c-b90e-416b472ada64",
-                "diskofferingid": "46f0a62e-ba3c-4a49-b619-877a8b2a07ed",
-                "id": "8552cdce-879a-42f3-bdb5-2e7f55a38996",
-                "zonename": "Sandbox-simulator"
-            }
-        },
-        "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/create_vpc_invalid_cidr.json
----------------------------------------------------------------------
diff --git a/tests/data/create_vpc_invalid_cidr.json b/tests/data/create_vpc_invalid_cidr.json
deleted file mode 100644
index 7d6c174..0000000
--- a/tests/data/create_vpc_invalid_cidr.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "createvpcresponse": {
-        "errorcode": 431,
-        "uuidlist": [],
-        "cserrorcode": 4350,
-        "errortext": "Invalid CIDR specified 192.168.0.2/33"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/delete_keypair.json
----------------------------------------------------------------------
diff --git a/tests/data/delete_keypair.json b/tests/data/delete_keypair.json
deleted file mode 100644
index 7c3d5a3..0000000
--- a/tests/data/delete_keypair.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{ "deletesshkeypairresponse": {
-    "success": "true"
-}  }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/delete_tag.json
----------------------------------------------------------------------
diff --git a/tests/data/delete_tag.json b/tests/data/delete_tag.json
deleted file mode 100644
index 2874489..0000000
--- a/tests/data/delete_tag.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-    "queryasyncjobresultresponse": {
-        "jobprocstatus": 0,
-        "created": "2014-06-01T12:22:48+0200",
-        "cmd": "org.apache.cloudstack.api.command.user.tag.DeleteTagsCmd",
-        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
-        "jobstatus": 1,
-        "jobid": "5af5c011-c708-4f36-8a99-caca51590458",
-        "jobresultcode": 0,
-        "jobresulttype": "object",
-        "jobresult": {
-            "success": true
-        },
-        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/delete_volume_response.json
----------------------------------------------------------------------
diff --git a/tests/data/delete_volume_response.json b/tests/data/delete_volume_response.json
deleted file mode 100644
index ff38c40..0000000
--- a/tests/data/delete_volume_response.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-    "deletevolumeresponse": {
-        "success": "true"
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/duplicate_authorize_security_group_egress.json
----------------------------------------------------------------------
diff --git a/tests/data/duplicate_authorize_security_group_egress.json b/tests/data/duplicate_authorize_security_group_egress.json
deleted file mode 100644
index b514f3d..0000000
--- a/tests/data/duplicate_authorize_security_group_egress.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{ "queryasyncjobresultresponse": {
-    "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d",
-    "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
-    "cmd": "org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupEgressCmd",
-    "jobstatus": 2,
-    "jobprocstatus": 0,
-    "jobresultcode": 530,
-    "jobresulttype": "object",
-    "jobresult": {
-        "errorcode": 530,
-        "errortext": "Failed to authorize security group egress rule(s)"
-    },
-    "created": "2014-02-26T23:23:37+0000",
-    "jobid": "44f44afd-b6dd-4205-9d81-7251bf49326e"
-} }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/duplicate_authorize_security_group_ingress.json
----------------------------------------------------------------------
diff --git a/tests/data/duplicate_authorize_security_group_ingress.json b/tests/data/duplicate_authorize_security_group_ingress.json
deleted file mode 100644
index 9a9a9b6..0000000
--- a/tests/data/duplicate_authorize_security_group_ingress.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{ "queryasyncjobresultresponse": {
-    "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d",
-    "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
-    "cmd": "org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupIngressCmd",
-    "jobstatus": 2,
-    "jobprocstatus": 0,
-    "jobresultcode": 530,
-    "jobresulttype": "object",
-    "jobresult": {
-        "errorcode": 530,
-        "errortext": "Failed to authorize security group ingress rule(s)"
-    },
-    "created": "2014-02-26T23:07:47+0000",
-    "jobid": "342882ec-fdfa-44fa-9ea0-b14b0285b875"
-} }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/duplicate_create_keypair.json
----------------------------------------------------------------------
diff --git a/tests/data/duplicate_create_keypair.json b/tests/data/duplicate_create_keypair.json
deleted file mode 100644
index 88835a9..0000000
--- a/tests/data/duplicate_create_keypair.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{ "createsshkeypairresponse": {
-    "uuidList": [],
-    "errorcode": 431,
-    "errortext": "A key pair with name 'Test' already exists."
-} }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/duplicate_create_security_group.json
----------------------------------------------------------------------
diff --git a/tests/data/duplicate_create_security_group.json b/tests/data/duplicate_create_security_group.json
deleted file mode 100644
index 3a038b8..0000000
--- a/tests/data/duplicate_create_security_group.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-    "createsecuritygroupresponse": {
-        "errorcode": 431,
-        "uuidlist": [],
-        "errortext": "Unable to create security group, a group with name securitygroupname already exisits."
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/duplicate_import_keypair.json
----------------------------------------------------------------------
diff --git a/tests/data/duplicate_import_keypair.json b/tests/data/duplicate_import_keypair.json
deleted file mode 100644
index 0b6ea96..0000000
--- a/tests/data/duplicate_import_keypair.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-    "registersshkeypairresponse": {
-        "errorcode": 431,
-        "uuidlist": [],
-        "errortext": "A key pair with name 'tester123572' already exists."
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_authorize_security_group_egress_duplicate.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_authorize_security_group_egress_duplicate.json b/tests/data/invalid_authorize_security_group_egress_duplicate.json
new file mode 100644
index 0000000..b514f3d
--- /dev/null
+++ b/tests/data/invalid_authorize_security_group_egress_duplicate.json
@@ -0,0 +1,15 @@
+{ "queryasyncjobresultresponse": {
+    "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d",
+    "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
+    "cmd": "org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupEgressCmd",
+    "jobstatus": 2,
+    "jobprocstatus": 0,
+    "jobresultcode": 530,
+    "jobresulttype": "object",
+    "jobresult": {
+        "errorcode": 530,
+        "errortext": "Failed to authorize security group egress rule(s)"
+    },
+    "created": "2014-02-26T23:23:37+0000",
+    "jobid": "44f44afd-b6dd-4205-9d81-7251bf49326e"
+} }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_authorize_security_group_ingress_duplicate.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_authorize_security_group_ingress_duplicate.json b/tests/data/invalid_authorize_security_group_ingress_duplicate.json
new file mode 100644
index 0000000..9a9a9b6
--- /dev/null
+++ b/tests/data/invalid_authorize_security_group_ingress_duplicate.json
@@ -0,0 +1,15 @@
+{ "queryasyncjobresultresponse": {
+    "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d",
+    "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
+    "cmd": "org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupIngressCmd",
+    "jobstatus": 2,
+    "jobprocstatus": 0,
+    "jobresultcode": 530,
+    "jobresulttype": "object",
+    "jobresult": {
+        "errorcode": 530,
+        "errortext": "Failed to authorize security group ingress rule(s)"
+    },
+    "created": "2014-02-26T23:07:47+0000",
+    "jobid": "342882ec-fdfa-44fa-9ea0-b14b0285b875"
+} }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_create_keypair_duplicate.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_create_keypair_duplicate.json b/tests/data/invalid_create_keypair_duplicate.json
new file mode 100644
index 0000000..88835a9
--- /dev/null
+++ b/tests/data/invalid_create_keypair_duplicate.json
@@ -0,0 +1,5 @@
+{ "createsshkeypairresponse": {
+    "uuidList": [],
+    "errorcode": 431,
+    "errortext": "A key pair with name 'Test' already exists."
+} }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_create_security_group_duplicate.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_create_security_group_duplicate.json b/tests/data/invalid_create_security_group_duplicate.json
new file mode 100644
index 0000000..3a038b8
--- /dev/null
+++ b/tests/data/invalid_create_security_group_duplicate.json
@@ -0,0 +1,7 @@
+{
+    "createsecuritygroupresponse": {
+        "errorcode": 431,
+        "uuidlist": [],
+        "errortext": "Unable to create security group, a group with name securitygroupname already exisits."
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_create_tag.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_create_tag.json b/tests/data/invalid_create_tag.json
deleted file mode 100644
index d0defb5..0000000
--- a/tests/data/invalid_create_tag.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "queryasyncjobresultresponse": {
-        "jobprocstatus": 0,
-        "created": "2014-06-01T13:43:16+0200",
-        "cmd": "org.apache.cloudstack.api.command.user.tag.CreateTagsCmd",
-        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
-        "jobstatus": 2,
-        "jobid": "3cca108f-53df-4a57-8975-3caf29e9d313",
-        "jobresultcode": 530,
-        "jobresulttype": "object",
-        "jobresult": {
-            "errorcode": 530,
-            "errortext": "Unable to find resource by id a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d and type UserVm"
-        },
-        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_create_tag_invalid_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_create_tag_invalid_id.json b/tests/data/invalid_create_tag_invalid_id.json
new file mode 100644
index 0000000..d0defb5
--- /dev/null
+++ b/tests/data/invalid_create_tag_invalid_id.json
@@ -0,0 +1,17 @@
+{
+    "queryasyncjobresultresponse": {
+        "jobprocstatus": 0,
+        "created": "2014-06-01T13:43:16+0200",
+        "cmd": "org.apache.cloudstack.api.command.user.tag.CreateTagsCmd",
+        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
+        "jobstatus": 2,
+        "jobid": "3cca108f-53df-4a57-8975-3caf29e9d313",
+        "jobresultcode": 530,
+        "jobresulttype": "object",
+        "jobresult": {
+            "errorcode": 530,
+            "errortext": "Unable to find resource by id a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d and type UserVm"
+        },
+        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_create_volume_invalid_snapshot_response.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_create_volume_invalid_snapshot_response.json b/tests/data/invalid_create_volume_invalid_snapshot_response.json
new file mode 100644
index 0000000..3d2b58e
--- /dev/null
+++ b/tests/data/invalid_create_volume_invalid_snapshot_response.json
@@ -0,0 +1,8 @@
+{
+    "createvolumeresponse": {
+        "errorcode": 431,
+        "uuidlist": [],
+        "cserrorcode": 4350,
+        "errortext": "unable to find a snapshot with id 45"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_create_vpc_invalid_cidr.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_create_vpc_invalid_cidr.json b/tests/data/invalid_create_vpc_invalid_cidr.json
new file mode 100644
index 0000000..7d6c174
--- /dev/null
+++ b/tests/data/invalid_create_vpc_invalid_cidr.json
@@ -0,0 +1,8 @@
+{
+    "createvpcresponse": {
+        "errorcode": 431,
+        "uuidlist": [],
+        "cserrorcode": 4350,
+        "errortext": "Invalid CIDR specified 192.168.0.2/33"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_delete_tag.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_delete_tag.json b/tests/data/invalid_delete_tag.json
deleted file mode 100644
index ba015af..0000000
--- a/tests/data/invalid_delete_tag.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "queryasyncjobresultresponse": {
-        "jobprocstatus": 0,
-        "created": "2014-06-01T13:43:16+0200",
-        "cmd": "org.apache.cloudstack.api.command.user.tag.DeleteTagsCmd",
-        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
-        "jobstatus": 2,
-        "jobid": "3cca108f-53df-4a57-8975-3caf29e9d313",
-        "jobresultcode": 530,
-        "jobresulttype": "object",
-        "jobresult": {
-            "errorcode": 530,
-            "errortext": "Unable to find resource by id a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d and type UserVm"
-        },
-        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_delete_tag_invalid_tag_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_delete_tag_invalid_tag_id.json b/tests/data/invalid_delete_tag_invalid_tag_id.json
new file mode 100644
index 0000000..ba015af
--- /dev/null
+++ b/tests/data/invalid_delete_tag_invalid_tag_id.json
@@ -0,0 +1,17 @@
+{
+    "queryasyncjobresultresponse": {
+        "jobprocstatus": 0,
+        "created": "2014-06-01T13:43:16+0200",
+        "cmd": "org.apache.cloudstack.api.command.user.tag.DeleteTagsCmd",
+        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
+        "jobstatus": 2,
+        "jobid": "3cca108f-53df-4a57-8975-3caf29e9d313",
+        "jobresultcode": 530,
+        "jobresulttype": "object",
+        "jobresult": {
+            "errorcode": 530,
+            "errortext": "Unable to find resource by id a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d and type UserVm"
+        },
+        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_delete_volume_invalid_volume_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_delete_volume_invalid_volume_id.json b/tests/data/invalid_delete_volume_invalid_volume_id.json
new file mode 100644
index 0000000..0a1b8e8
--- /dev/null
+++ b/tests/data/invalid_delete_volume_invalid_volume_id.json
@@ -0,0 +1,8 @@
+{
+    "deletevolumeresponse": {
+        "errorcode": 431,
+        "uuidlist": [],
+        "cserrorcode": 4350,
+        "errortext": "Unable to aquire volume with ID: 45"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_describe_image_invalid_image_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_describe_image_invalid_image_id.json b/tests/data/invalid_describe_image_invalid_image_id.json
new file mode 100644
index 0000000..0ca8f90
--- /dev/null
+++ b/tests/data/invalid_describe_image_invalid_image_id.json
@@ -0,0 +1,8 @@
+{
+    "listtemplatesresponse": {
+        "errorcode": 431,
+        "uuidlist": [],
+        "cserrorcode": 4350,
+        "errortext": "Please specify a valid template ID."
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_describe_volume_invalid_instance_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_describe_volume_invalid_instance_id.json b/tests/data/invalid_describe_volume_invalid_instance_id.json
new file mode 100644
index 0000000..11f93dc
--- /dev/null
+++ b/tests/data/invalid_describe_volume_invalid_instance_id.json
@@ -0,0 +1,3 @@
+{
+    "listvirtualmachinesresponse": {}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_image_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_image_id.json b/tests/data/invalid_image_id.json
deleted file mode 100644
index 0ca8f90..0000000
--- a/tests/data/invalid_image_id.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "listtemplatesresponse": {
-        "errorcode": 431,
-        "uuidlist": [],
-        "cserrorcode": 4350,
-        "errortext": "Please specify a valid template ID."
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_import_keypair_duplicate.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_import_keypair_duplicate.json b/tests/data/invalid_import_keypair_duplicate.json
new file mode 100644
index 0000000..0b6ea96
--- /dev/null
+++ b/tests/data/invalid_import_keypair_duplicate.json
@@ -0,0 +1,7 @@
+{
+    "registersshkeypairresponse": {
+        "errorcode": 431,
+        "uuidlist": [],
+        "errortext": "A key pair with name 'tester123572' already exists."
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_instance_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_instance_id.json b/tests/data/invalid_instance_id.json
deleted file mode 100644
index 11f93dc..0000000
--- a/tests/data/invalid_instance_id.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-    "listvirtualmachinesresponse": {}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/invalid_volume_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_volume_id.json b/tests/data/invalid_volume_id.json
deleted file mode 100644
index 0a1b8e8..0000000
--- a/tests/data/invalid_volume_id.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "deletevolumeresponse": {
-        "errorcode": 431,
-        "uuidlist": [],
-        "cserrorcode": 4350,
-        "errortext": "Unable to aquire volume with ID: 45"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/list_tags.json
----------------------------------------------------------------------
diff --git a/tests/data/list_tags.json b/tests/data/list_tags.json
deleted file mode 100644
index 9076631..0000000
--- a/tests/data/list_tags.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-    "listtagsresponse": {
-        "count": 2,
-        "tag": [
-            {
-                "account": "brogand93@darrenbrogan.ie",
-                "domainid": "42f2b0d0-3953-485f-984d-b8d67185d358",
-                "resourcetype": "UserVm",
-                "resourceid": "a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d69",
-                "domain": "brogand93@darrenbrogan.ie",
-                "value": "po",
-                "key": "gjh"
-            },
-            {
-                "account": "brogand93@darrenbrogan.ie",
-                "domainid": "42f2b0d0-3953-485f-984d-b8d67185d358",
-                "resourcetype": "UserVm",
-                "resourceid": "a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d69",
-                "domain": "brogand93@darrenbrogan.ie",
-                "value": "test",
-                "key": "testkey"
-            }
-        ]
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/valid_authorize_security_group_egress.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_authorize_security_group_egress.json b/tests/data/valid_authorize_security_group_egress.json
new file mode 100644
index 0000000..4042974
--- /dev/null
+++ b/tests/data/valid_authorize_security_group_egress.json
@@ -0,0 +1,32 @@
+{ "queryasyncjobresultresponse": {
+    "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d",
+    "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
+    "cmd": "org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupEgressCmd",
+    "jobstatus": 1,
+    "jobprocstatus": 0,
+    "jobresultcode": 0,
+    "jobresulttype": "object",
+    "jobresult": {
+        "securitygroup": {
+            "id": "01104a6a-bd3c-4804-86fd-1ca6231f128d",
+            "name": "test5",
+            "description": "test5",
+            "account": "test",
+            "domainid": "2edae3e4-95e4-11e3-b2e4-d19c9d3e5e1d",
+            "domain": "ROOT",
+            "ingressrule": [],
+            "egressrule": [
+                {
+                    "ruleid": "1ff7ed29-d75a-47ad-a82a-da57da8d679e",
+                    "protocol": "tcp",
+                    "startport": 1000,
+                    "endport": 1024,
+                    "cidr": "0.0.0.0/0"
+                }
+            ],
+            "tags": []
+        }
+    },
+    "created": "2014-02-26T23:22:50+0000",
+    "jobid": "c72d64f5-062e-48ca-8ea5-8fe71987673a"
+} }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/valid_authorize_security_group_ingress.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_authorize_security_group_ingress.json b/tests/data/valid_authorize_security_group_ingress.json
new file mode 100644
index 0000000..5b20e71
--- /dev/null
+++ b/tests/data/valid_authorize_security_group_ingress.json
@@ -0,0 +1,32 @@
+{ "queryasyncjobresultresponse": {
+    "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d",
+    "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
+    "cmd": "org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupIngressCmd",
+    "jobstatus": 1,
+    "jobprocstatus": 0,
+    "jobresultcode": 0,
+    "jobresulttype": "object",
+    "jobresult": {
+        "securitygroup": {
+            "id": "01104a6a-bd3c-4804-86fd-1ca6231f128d",
+            "name": "test5",
+            "description": "test5",
+            "account": "test",
+            "domainid": "2edae3e4-95e4-11e3-b2e4-d19c9d3e5e1d",
+            "domain": "ROOT",
+            "ingressrule": [
+                {
+                    "ruleid": "739f53a3-ce50-4790-a86d-1051f77dd3d2",
+                    "protocol": "tcp",
+                    "startport": 1000,
+                    "endport": 1024,
+                    "cidr": "0.0.0.0/0"
+                }
+            ],
+            "egressrule": [],
+            "tags": []
+        }
+    },
+    "created": "2014-02-26T23:05:55+0000",
+    "jobid": "ed5d7cc6-776a-4fda-b4c4-b71421b56c82"
+} }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/valid_create_tag.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_create_tag.json b/tests/data/valid_create_tag.json
new file mode 100644
index 0000000..9680fb5
--- /dev/null
+++ b/tests/data/valid_create_tag.json
@@ -0,0 +1,16 @@
+{
+    "queryasyncjobresultresponse": {
+        "jobprocstatus": 0,
+        "created": "2014-06-01T12:00:56+0200",
+        "cmd": "org.apache.cloudstack.api.command.user.tag.CreateTagsCmd",
+        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
+        "jobstatus": 1,
+        "jobid": "036bf202-6fe5-4b73-8823-d9e22cd3c63f",
+        "jobresultcode": 0,
+        "jobresulttype": "object",
+        "jobresult": {
+            "success": true
+        },
+        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/valid_create_volume_response.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_create_volume_response.json b/tests/data/valid_create_volume_response.json
new file mode 100644
index 0000000..79826ba
--- /dev/null
+++ b/tests/data/valid_create_volume_response.json
@@ -0,0 +1,38 @@
+{
+    "queryasyncjobresultresponse": {
+        "jobprocstatus": 0,
+        "created": "2014-02-25T19:46:35+0000",
+        "cmd": "org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd",
+        "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
+        "jobstatus": 1,
+        "jobid": "1f32404b-d067-43e8-8835-4cc1c55d737a",
+        "jobresultcode": 0,
+        "jobresulttype": "object",
+        "jobresult": {
+            "volume": {
+                "size": 10737418240,
+                "diskofferingname": "Custom",
+                "account": "admin",
+                "domainid": "2edae3e4-95e4-11e3-b2e4-d19c9d3e5e1d",
+                "name": "f0e2a699-1196-49bd-90cd-af809f4c32ea",
+                "created": "2014-02-25T19:46:34+0000",
+                "storagetype": "shared",
+                "type": "DATADISK",
+                "tags": [],
+                "domain": "ROOT",
+                "jobstatus": 0,
+                "jobid": "1f32404b-d067-43e8-8835-4cc1c55d737a",
+                "destroyed": false,
+                "state": "Allocated",
+                "diskofferingdisplaytext": "Custom Disk",
+                "isextractable": true,
+                "displayvolume": true,
+                "zoneid": "1e47a2fc-61c7-401c-b90e-416b472ada64",
+                "diskofferingid": "46f0a62e-ba3c-4a49-b619-877a8b2a07ed",
+                "id": "8552cdce-879a-42f3-bdb5-2e7f55a38996",
+                "zonename": "Sandbox-simulator"
+            }
+        },
+        "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/valid_delete_keypair.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_delete_keypair.json b/tests/data/valid_delete_keypair.json
new file mode 100644
index 0000000..7c3d5a3
--- /dev/null
+++ b/tests/data/valid_delete_keypair.json
@@ -0,0 +1,3 @@
+{ "deletesshkeypairresponse": {
+    "success": "true"
+}  }

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/valid_delete_tag.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_delete_tag.json b/tests/data/valid_delete_tag.json
new file mode 100644
index 0000000..2874489
--- /dev/null
+++ b/tests/data/valid_delete_tag.json
@@ -0,0 +1,16 @@
+{
+    "queryasyncjobresultresponse": {
+        "jobprocstatus": 0,
+        "created": "2014-06-01T12:22:48+0200",
+        "cmd": "org.apache.cloudstack.api.command.user.tag.DeleteTagsCmd",
+        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
+        "jobstatus": 1,
+        "jobid": "5af5c011-c708-4f36-8a99-caca51590458",
+        "jobresultcode": 0,
+        "jobresulttype": "object",
+        "jobresult": {
+            "success": true
+        },
+        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/valid_delete_volume_response.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_delete_volume_response.json b/tests/data/valid_delete_volume_response.json
new file mode 100644
index 0000000..ff38c40
--- /dev/null
+++ b/tests/data/valid_delete_volume_response.json
@@ -0,0 +1,5 @@
+{
+    "deletevolumeresponse": {
+        "success": "true"
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/data/valid_describe_tags.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_describe_tags.json b/tests/data/valid_describe_tags.json
new file mode 100644
index 0000000..9076631
--- /dev/null
+++ b/tests/data/valid_describe_tags.json
@@ -0,0 +1,25 @@
+{
+    "listtagsresponse": {
+        "count": 2,
+        "tag": [
+            {
+                "account": "brogand93@darrenbrogan.ie",
+                "domainid": "42f2b0d0-3953-485f-984d-b8d67185d358",
+                "resourcetype": "UserVm",
+                "resourceid": "a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d69",
+                "domain": "brogand93@darrenbrogan.ie",
+                "value": "po",
+                "key": "gjh"
+            },
+            {
+                "account": "brogand93@darrenbrogan.ie",
+                "domainid": "42f2b0d0-3953-485f-984d-b8d67185d358",
+                "resourcetype": "UserVm",
+                "resourceid": "a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d69",
+                "domain": "brogand93@darrenbrogan.ie",
+                "value": "test",
+                "key": "testkey"
+            }
+        ]
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/disk_offering_tests.py
----------------------------------------------------------------------
diff --git a/tests/disk_offering_tests.py b/tests/disk_offering_tests.py
index c091229..fcdaca2 100644
--- a/tests/disk_offering_tests.py
+++ b/tests/disk_offering_tests.py
@@ -20,7 +20,7 @@ class DiskOfferingsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/create_volume_response.json'
+            'tests/data/valid_create_volume_response.json'
         )
         get.return_value.status_code = 200
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/keypair_tests.py
----------------------------------------------------------------------
diff --git a/tests/keypair_tests.py b/tests/keypair_tests.py
index 9017a65..2e6732a 100644
--- a/tests/keypair_tests.py
+++ b/tests/keypair_tests.py
@@ -40,7 +40,7 @@ class KeyPairTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/duplicate_create_keypair.json'
+            'tests/data/invalid_create_keypair_duplicate.json'
         )
         get.return_value.status_code = 431
 
@@ -61,7 +61,7 @@ class KeyPairTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/delete_keypair.json'
+            'tests/data/valid_delete_keypair.json'
         )
         get.return_value.status_code = 200
 
@@ -119,7 +119,7 @@ class KeyPairTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/duplicate_import_keypair.json'
+            'tests/data/invalid_import_keypair_duplicate.json'
         )
         get.return_value.status_code = 431
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/security_group_tests.py
----------------------------------------------------------------------
diff --git a/tests/security_group_tests.py b/tests/security_group_tests.py
index f276907..57c07b1 100644
--- a/tests/security_group_tests.py
+++ b/tests/security_group_tests.py
@@ -23,7 +23,7 @@ class SecurityGroupTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/authorize_security_group_ingress.json'
+            'tests/data/valid_authorize_security_group_ingress.json'
         )
         get.return_value.status_code = 200
 
@@ -47,7 +47,7 @@ class SecurityGroupTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/authorize_security_group_ingress.json'
+            'tests/data/valid_authorize_security_group_ingress.json'
         )
         get.return_value.status_code = 200
 
@@ -72,7 +72,7 @@ class SecurityGroupTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/authorize_security_group_egress.json'
+            'tests/data/valid_authorize_security_group_egress.json'
         )
         get.return_value.status_code = 200
 
@@ -96,7 +96,7 @@ class SecurityGroupTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/authorize_security_group_egress.json'
+            'tests/data/valid_authorize_security_group_egress.json'
         )
         get.return_value.status_code = 200
 
@@ -121,7 +121,7 @@ class SecurityGroupTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/duplicate_authorize_security_group_egress.json'
+            'tests/data/invalid_authorize_security_group_egress_duplicate.json'
         )
         get.return_value.status_code = 200
 
@@ -216,7 +216,7 @@ class SecurityGroupTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/duplicate_create_security_group.json'
+            'tests/data/invalid_create_security_group_duplicate.json'
         )
         get.return_value.status_code = 431
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/tags_tests.py
----------------------------------------------------------------------
diff --git a/tests/tags_tests.py b/tests/tags_tests.py
index 10f4fad..6dc1958 100644
--- a/tests/tags_tests.py
+++ b/tests/tags_tests.py
@@ -23,7 +23,7 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/create_tag.json'
+            'tests/data/valid_create_tag.json'
         )
         get.return_value.status_code = 200
 
@@ -48,7 +48,7 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/create_tag.json'
+            'tests/data/valid_create_tag.json'
         )
         get.return_value.status_code = 200
 
@@ -73,7 +73,7 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/invalid_create_tag.json'
+            'tests/data/invalid_create_tag_invalid_id.json'
         )
         get.return_value.status_code = 200
 
@@ -97,7 +97,7 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/delete_tag.json'
+            'tests/data/valid_delete_tag.json'
         )
         get.return_value.status_code = 200
 
@@ -121,7 +121,7 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/delete_tag.json'
+            'tests/data/valid_delete_tag.json'
         )
         get.return_value.status_code = 200
 
@@ -145,7 +145,7 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/invalid_delete_tag.json'
+            'tests/data/invalid_delete_tag_invalid_tag_id.json'
         )
         get.return_value.status_code = 200
 
@@ -155,8 +155,6 @@ class TagsTestCase(Ec2StackAppTestCase):
                 data=data
             )
 
-        print response.data
-
         self.assert_bad_request(response)
         assert 'The specified ID for the resource you are trying to tag is not valid.' in response.data
 
@@ -168,7 +166,7 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/delete_keypair.json'
+            'tests/data/valid_delete_keypair.json'
         )
         get.return_value.status_code = 200
 
@@ -188,7 +186,7 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/list_tags.json'
+            'tests/data/valid_describe_tags.json'
         )
         get.return_value.status_code = 200
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/volume_tests.py
----------------------------------------------------------------------
diff --git a/tests/volume_tests.py b/tests/volume_tests.py
index e787095..6e6c5c3 100644
--- a/tests/volume_tests.py
+++ b/tests/volume_tests.py
@@ -112,7 +112,7 @@ class VolumeTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/create_volume_response.json'
+            'tests/data/valid_create_volume_response.json'
         )
         get.return_value.status_code = 200
 
@@ -152,7 +152,7 @@ class VolumeTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/create_volume_response.json'
+            'tests/data/valid_create_volume_response.json'
         )
         get.return_value.status_code = 200
 
@@ -183,7 +183,7 @@ class VolumeTestCase(Ec2StackAppTestCase):
 
         get_request = mock.Mock()
         get_request.return_value.text = read_file(
-            'tests/data/create_volume_invalid_snapshot_response.json'
+            'tests/data/invalid_create_volume_invalid_snapshot_response.json'
         )
         get_request.return_value.status_code = 431
 
@@ -257,7 +257,7 @@ class VolumeTestCase(Ec2StackAppTestCase):
 
         get_request = mock.Mock()
         get_request.return_value.text = read_file(
-            'tests/data/delete_volume_response.json'
+            'tests/data/valid_delete_volume_response.json'
         )
         get_request.return_value.status_code = 200
 
@@ -278,7 +278,7 @@ class VolumeTestCase(Ec2StackAppTestCase):
 
         get_request = mock.Mock()
         get_request.return_value.text = read_file(
-            'tests/data/invalid_volume_id.json'
+            'tests/data/invalid_delete_volume_invalid_volume_id.json'
         )
         get_request.return_value.status_code = 200
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/vpc_tests.py
----------------------------------------------------------------------
diff --git a/tests/vpc_tests.py b/tests/vpc_tests.py
index 5ed3a26..da05c58 100644
--- a/tests/vpc_tests.py
+++ b/tests/vpc_tests.py
@@ -55,7 +55,7 @@ class VpcTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/create_vpc_invalid_cidr.json'
+            'tests/data/invalid_create_vpc_invalid_cidr.json'
         )
         get.return_value.status_code = 200
 
@@ -109,7 +109,7 @@ class VpcTestCase(Ec2StackAppTestCase):
                 '/',
                 data=data
             )
-        print response.data
+
         self.assert_ok(response)
         assert 'DescribeVpcsResponse' in response.data
         assert 'examplevpc' in response.data

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/343f3273/tests/zones_tests.py
----------------------------------------------------------------------
diff --git a/tests/zones_tests.py b/tests/zones_tests.py
index 7b5f5bd..5f0d9e5 100644
--- a/tests/zones_tests.py
+++ b/tests/zones_tests.py
@@ -104,7 +104,7 @@ class ZonesTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/create_volume_response.json'
+            'tests/data/valid_create_volume_response.json'
         )
         get.return_value.status_code = 200
 


[20/50] cloudstack-ec2stack git commit: Fix bug where VPC_OFFERING_ID isn't in configuration and user tries to create vpc

Posted by se...@apache.org.
Fix bug where VPC_OFFERING_ID isn't in configuration and user tries to create vpc


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/064531a3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/064531a3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/064531a3

Branch: refs/heads/master
Commit: 064531a3e4b8cb6f6f6d3293d5abe99afbdfce20
Parents: 7c5417e
Author: BroganD1993 <da...@hotmail.com>
Authored: Thu Aug 7 18:38:33 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Thu Aug 7 18:38:33 2014 +0100

----------------------------------------------------------------------
 ec2stack/providers/cloudstack/vpcs.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/064531a3/ec2stack/providers/cloudstack/vpcs.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/vpcs.py b/ec2stack/providers/cloudstack/vpcs.py
index 55c81d8..9591d54 100644
--- a/ec2stack/providers/cloudstack/vpcs.py
+++ b/ec2stack/providers/cloudstack/vpcs.py
@@ -37,7 +37,14 @@ def _create_vpc_request():
     args['displaytext'] = name
     args['zoneid'] = zones.get_zone(
         current_app.config['CLOUDSTACK_DEFAULT_ZONE'])['id']
-    args['vpcofferingid'] = current_app.config['VPC_OFFERING_ID']
+
+    if 'VPC_OFFERING_ID' in current_app.config:
+        args['vpcofferingid'] = current_app.config['VPC_OFFERING_ID']
+    else:
+        errors.invalid_request(
+            str('VPC_OFFERING_ID') + " not found in configuration, " +
+            "please run ec2stack-configure -a True")
+
     args['cidr'] = helpers.get('CidrBlock')
 
     response = requester.make_request_async(args)


[31/50] cloudstack-ec2stack git commit: If volume type set to gp2 - attach shared on instance creation

Posted by se...@apache.org.
If volume type set to gp2 - attach shared on instance creation


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/249834f8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/249834f8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/249834f8

Branch: refs/heads/master
Commit: 249834f8c816e90dfc3ca40a1aadddca8e28e947
Parents: ad3b688
Author: BroganD1993 <da...@hotmail.com>
Authored: Sat Aug 16 10:32:59 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Sat Aug 16 10:32:59 2014 +0100

----------------------------------------------------------------------
 ec2stack/providers/cloudstack/instances.py | 123 +++++++++++-------------
 1 file changed, 55 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/249834f8/ec2stack/providers/cloudstack/instances.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/instances.py b/ec2stack/providers/cloudstack/instances.py
index b391c51..84aa429 100644
--- a/ec2stack/providers/cloudstack/instances.py
+++ b/ec2stack/providers/cloudstack/instances.py
@@ -8,7 +8,8 @@ instances.
 from flask import current_app
 
 from ec2stack.providers import cloudstack
-from ec2stack.providers.cloudstack import requester, service_offerings, zones, disk_offerings
+from ec2stack.providers.cloudstack import requester, service_offerings, zones, \
+    disk_offerings, volumes
 from ec2stack import helpers, errors
 
 
@@ -104,6 +105,48 @@ def _describe_instances_response(response):
 
 
 @helpers.authentication_required
+def reboot_instance():
+    """
+    Reboot an instance.
+
+    @return: Response.
+    """
+    helpers.require_parameters(['InstanceId.1'])
+    instance_id = helpers.get('InstanceId.1')
+    _reboot_instance_request(instance_id)
+    return _reboot_instance_response()
+
+
+def _reboot_instance_request(instance_id):
+    """
+    Request to reboot an instance.
+
+    @param instance_id: Id of instance to be rebooted.
+    @return: Response.
+    """
+    args = {'command': 'rebootVirtualMachine',
+            'id': instance_id}
+    response = requester.make_request_async(args)
+    response = response['virtualmachine']
+    return response
+
+
+def _reboot_instance_response():
+    """
+    Generates a response for a reboot instance request.
+
+    @return: Response.
+    """
+    response = {
+        'template_name_or_list': 'status.xml',
+        'response_type': 'RebootInstancesResponse',
+        'return': 'true'
+    }
+
+    return response
+
+
+@helpers.authentication_required
 def run_instance():
     """
     Run a instance.
@@ -122,21 +165,26 @@ def _run_instance_request():
 
     @return: Response.
     """
-
     args = {}
     if helpers.contains_parameter('Placement.AvailabilityZone'):
-        zone_id = zones.get_zone(
+        args['zoneid'] = zones.get_zone(
             helpers.get('Placement.AvailabilityZone')
         )
     else:
-        zone_id = zones.get_zone(
+        args['zoneid'] = zones.get_zone(
             current_app.config['CLOUDSTACK_DEFAULT_ZONE']
         )['id']
 
     if helpers.get('BlockDeviceMapping.1.Ebs.VolumeType') is not None:
-        args = _get_simulated_combination_instance_storage_args(zone_id)
-    else:
-        args['zoneid'] = zone_id
+        disk_type = helpers.get('BlockDeviceMapping.1.Ebs.VolumeType')
+        if disk_type == 'gp2':
+            args['diskofferingid'] = disk_offerings.get_disk_offering(
+                current_app.config['CLOUDSTACK_LOCAL_CUSTOM_DISK_OFFERING']
+            )['id']
+        if helpers.get('BlockDeviceMapping.1.Ebs.VolumeSize') is None:
+            errors.invalid_request("VolumeSize not found in BlockDeviceMapping")
+        else:
+            args['size'] = helpers.get('BlockDeviceMapping.1.Ebs.VolumeSize')
 
     if helpers.get('InstanceType') is None:
         instance_type = 'm1.small'
@@ -183,25 +231,6 @@ def _run_instance_request():
 
     return response
 
-def _get_simulated_combination_instance_storage_args(zone_id):
-    args = {}
-    disk_type = helpers.get('BlockDeviceMapping.1.Ebs.VolumeType')
-    if disk_type == 'gp2':
-        if 'CLOUDSTACK_LOCAL_CUSTOM_DISK_OFFERING' in current_app.config:
-            args['diskofferingid'] = disk_offerings.get_disk_offering(
-                current_app.config['CLOUDSTACK_LOCAL_CUSTOM_DISK_OFFERING']
-            )['id']
-        else:
-            errors.invalid_request(
-                str('CLOUDSTACK_LOCAL_CUSTOM_DISK_OFFERING') + " not found in "
-                "configuration, no able to configure gp2 disk, please run ec2stack-configure and chose to configure "
-                "a local disk")
-
-    if helpers.get('BlockDeviceMapping.1.Ebs.VolumeSize') is None:
-        errors.invalid_request("VolumeSize not found in BlockDeviceMapping")
-    else:
-        args['size'] = helpers.get('BlockDeviceMapping.1.Ebs.VolumeSize')
-
 
 def _run_instance_response(response):
     """
@@ -231,48 +260,6 @@ def _run_instance_response(response):
 
 
 @helpers.authentication_required
-def reboot_instance():
-    """
-    Reboot an instance.
-
-    @return: Response.
-    """
-    helpers.require_parameters(['InstanceId.1'])
-    instance_id = helpers.get('InstanceId.1')
-    _reboot_instance_request(instance_id)
-    return _reboot_instance_response()
-
-
-def _reboot_instance_request(instance_id):
-    """
-    Request to reboot an instance.
-
-    @param instance_id: Id of instance to be rebooted.
-    @return: Response.
-    """
-    args = {'command': 'rebootVirtualMachine',
-            'id': instance_id}
-    response = requester.make_request_async(args)
-    response = response['virtualmachine']
-    return response
-
-
-def _reboot_instance_response():
-    """
-    Generates a response for a reboot instance request.
-
-    @return: Response.
-    """
-    response = {
-        'template_name_or_list': 'status.xml',
-        'response_type': 'RebootInstancesResponse',
-        'return': 'true'
-    }
-
-    return response
-
-
-@helpers.authentication_required
 def start_instance():
     """
     Starts an instance.


[06/50] cloudstack-ec2stack git commit: Modify configuration, add 'advanced' network option

Posted by se...@apache.org.
Modify configuration, add 'advanced' network option


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/95150953
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/95150953
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/95150953

Branch: refs/heads/master
Commit: 951509538ec13807dcd4d20c09a7df3207e2b49b
Parents: bd27404
Author: BroganD1993 <da...@hotmail.com>
Authored: Wed Jul 16 21:47:03 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Wed Jul 16 21:47:03 2014 +0100

----------------------------------------------------------------------
 ec2stack/__init__.py                       |   1 +
 ec2stack/configure.py                      |  45 +++++++-
 ec2stack/controllers/default.py            |   3 +-
 ec2stack/providers/cloudstack/requester.py |  21 ++--
 ec2stack/providers/cloudstack/volumes.py   |   2 +-
 ec2stack/providers/cloudstack/vpc.py       | 129 -----------------------
 ec2stack/providers/cloudstack/vpcs.py      | 130 ++++++++++++++++++++++++
 ec2stack/templates/create_vpc.xml          |   2 +-
 ec2stack/templates/vpcs.xml                |   2 +-
 9 files changed, 188 insertions(+), 147 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/95150953/ec2stack/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/__init__.py b/ec2stack/__init__.py
index 91ca81d..1c75571 100644
--- a/ec2stack/__init__.py
+++ b/ec2stack/__init__.py
@@ -31,6 +31,7 @@ def create_app(settings=None):
         args = _generate_args()
         profile = args.pop('profile')
         app.config['DEBUG'] = args.pop('debug')
+        app.config['DEBUG'] = True
         config_file = _load_config_file()
         database_uri = _load_database()
         _config_from_config_profile(config_file, profile, app)

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/95150953/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index 93b4649..3fa337d 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -43,8 +43,9 @@ def _create_config_file(config_folder):
     """
     args = _generate_args()
     profile = args.pop('profile')
+    advanced_network_enabled = args.pop('advanced')
     config_file_path = config_folder + '/ec2stack.conf'
-    config = _modify_config_profile(config_file_path, profile)
+    config = _modify_config_profile(config_file_path, profile, advanced_network_enabled)
     config_file = open(config_file_path, 'w+')
     config.write(config_file)
 
@@ -67,12 +68,20 @@ def _generate_args():
         default='initial'
     )
 
+    parser.add_argument(
+        '-a',
+        '--advanced',
+        required=False,
+        help='Turn advanced network config on for application',
+        default=False
+    )
+
     args = parser.parse_args()
 
     return vars(args)
 
 
-def _modify_config_profile(config_file, profile):
+def _modify_config_profile(config_file, profile, advanced_network_enabled):
     """
     Modify configuration profile.
 
@@ -86,6 +95,23 @@ def _modify_config_profile(config_file, profile):
     if not config.has_section(profile):
         config.add_section(profile)
 
+    config = _set_mandatory_attributes_of_profile(config, profile)
+
+    if advanced_network_enabled:
+        config = _set_advanced_network_attributes_of_profile(config, profile)
+
+    config = _set_optional_attributes_of_profile(config, profile)
+
+    return config
+
+def _set_mandatory_attributes_of_profile(config, profile):
+    """
+    Modify mandatory attributes of profile.
+
+    @param config: current configparser configuration.
+    @param profile: the profile to set the attribute in.
+    @return: configparser configuration.
+    """
     config = _set_attribute_of_profile(
         config, profile, 'ec2stack_bind_address', 'EC2Stack bind address', 'localhost'
     )
@@ -115,7 +141,20 @@ def _modify_config_profile(config_file, profile):
         if config.get(profile, 'cloudstack_default_zone') is not '':
             break
 
-    config = _set_optional_attributes_of_profile(config, profile)
+    return config
+
+
+def _set_advanced_network_attributes_of_profile(config, profile):
+    """
+    Modify advanced network attributes of profile.
+
+    @param config: current configparser configuration.
+    @param profile: the profile to set the attribute in.
+    @return: configparser configuration.
+    """
+    config = _set_attribute_of_profile(
+        config, profile, 'vpc_offering_id', 'VPC offering id', ''
+    )
 
     return config
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/95150953/ec2stack/controllers/default.py
----------------------------------------------------------------------
diff --git a/ec2stack/controllers/default.py b/ec2stack/controllers/default.py
index 97293dd..14503d8 100644
--- a/ec2stack/controllers/default.py
+++ b/ec2stack/controllers/default.py
@@ -8,7 +8,7 @@ from ec2stack.helpers import get, error_response, \
 from ec2stack.core import Ec2stackError
 from ec2stack.services import USERS
 from ec2stack.providers.cloudstack import images, instances, keypairs, \
-    passwords, security_groups, zones, volumes, tags
+    passwords, security_groups, zones, volumes, tags, vpcs
 
 
 DEFAULT = Blueprint('default', __name__)
@@ -47,6 +47,7 @@ def _get_action(action):
         'CreateSecurityGroup': security_groups.create_security_group,
         'CreateTags': tags.create_tags,
         'CreateVolume': volumes.create_volume,
+        'CreateVpc': vpcs.create_vpc,
         'DeleteKeyPair': keypairs.delete_keypair,
         'DeleteSecurityGroup': security_groups.delete_security_group,
         'DeleteTags': tags.delete_tags,

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/95150953/ec2stack/providers/cloudstack/requester.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/requester.py b/ec2stack/providers/cloudstack/requester.py
index 147b958..401a617 100644
--- a/ec2stack/providers/cloudstack/requester.py
+++ b/ec2stack/providers/cloudstack/requester.py
@@ -34,20 +34,19 @@ def make_request(args):
 
     response = requests.get(request_url)
 
+    response_data = json.loads(
+        response.text,
+        object_hook=helpers.normalize_dict_keys
+    )
+    current_app.logger.debug(
+        'request url:' + str(request_url) +
+        'status code: ' + str(response.status_code) +
+        json.dumps(response_data, indent=4, separators=(',', ': '))
+    )
+
     if response.status_code in [401, 432]:
         abort(400)
     else:
-        response_data = json.loads(
-            response.text,
-            object_hook=helpers.normalize_dict_keys
-        )
-
-        current_app.logger.debug(
-            'request url:' + str(request_url) +
-            'status code: ' + str(response.status_code) +
-            json.dumps(response_data, indent=4, separators=(',', ': '))
-        )
-
         return response_data
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/95150953/ec2stack/providers/cloudstack/volumes.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/volumes.py b/ec2stack/providers/cloudstack/volumes.py
index ec594bb..8b0cb4e 100644
--- a/ec2stack/providers/cloudstack/volumes.py
+++ b/ec2stack/providers/cloudstack/volumes.py
@@ -107,7 +107,7 @@ def _create_volume_request():
 
     args['zoneid'] = zone_id
     args['command'] = 'createVolume'
-    args['name'] = uuid.uuid()
+    args['name'] = uuid.uuid1()
 
     response = requester.make_request_async(args)
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/95150953/ec2stack/providers/cloudstack/vpc.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/vpc.py b/ec2stack/providers/cloudstack/vpc.py
deleted file mode 100644
index 440b875..0000000
--- a/ec2stack/providers/cloudstack/vpc.py
+++ /dev/null
@@ -1,129 +0,0 @@
-
-#!/usr/bin/env python
-# encoding: utf-8
-
-"""This module contains functions for handling requests in relation to vpcs.
-"""
-
-import uuid
-
-from ec2stack import errors
-from ec2stack import helpers
-from ec2stack.providers import cloudstack
-from ec2stack.providers.cloudstack import requester
-
-
-@helpers.authentication_required
-def create_vpc():
-    """
-    Create a vpc.
-
-    @return: Response.
-    """
-    response = _create_vpc_request()
-    return _create_vpc_response(response)
-
-
-def _create_vpc_request():
-    """
-    Request to create a vpc.
-
-    @return: Response.
-    """
-    args = {'command': 'createVPC'}
-    name = uuid.uuid()
-    args['name'] = name
-    args['id'] = name
-    args['cidr'] = helpers.get('CidrBlock')
-
-    response = requester.make_request(args)
-
-    response = response['createvpcresponse']
-
-    return response
-
-
-def _create_vpc_response(response):
-    """
-    Generates a response for create vpc request.
-
-    @param response: Response from Cloudstack.
-    @return: Response.
-    """
-    if 'errortext' in response:
-        errors.invalid_vpc_range()
-    else:
-        response = response['vpc']
-        return {
-            'template_name_or_list': 'create_vpc.xml',
-            'response_type': 'CreateVpcResponse',
-            'response': response
-        }
-
-@helpers.authentication_required
-def delete_vpc():
-    """
-    Delete a vpc.
-
-    @return: Response.
-    """
-    helpers.require_parameters(['VpcId'])
-    _delete_vpc_request()
-    return _delete_vpc_response()
-
-
-def _delete_vpc_request():
-    """
-    Request to delete a vpc.
-
-    @return: Response.
-    """
-    args = {'command': 'deleteVPC', 'id': helpers.get('VpcId')}
-
-    response = requester.make_request(args)
-
-    return response
-
-
-def _delete_vpc_response():
-    """
-    Generates a response for delete vpc request.
-
-    @return: Response.
-    """
-    return {
-        'template_name_or_list': 'status.xml',
-        'response_type': 'DeleteVpcResponse',
-        'return': 'true'
-    }
-
-@helpers.authentication_required
-def describe_vpcs():
-    """
-    Describes a specific vpc or all vpcs.
-
-    @return: Response.
-    """
-    args = {'command': 'listVPCs'}
-    response = cloudstack.describe_item(
-        args, 'vpc', {}, 'vpcId'
-    )
-
-    return _describe_vpc_response(
-        response
-    )
-
-
-def _describe_vpc_response(response):
-    """
-    Generates a response for describe vpc request.
-
-    @param response: Response from Cloudstack.
-    @return: Response.
-    """
-    return {
-        'template_name_or_list': 'vpcs.xml',
-        'response_type': 'DescribeVpcsResponse',
-        'response': response
-    }
-

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/95150953/ec2stack/providers/cloudstack/vpcs.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/vpcs.py b/ec2stack/providers/cloudstack/vpcs.py
new file mode 100644
index 0000000..5f877e2
--- /dev/null
+++ b/ec2stack/providers/cloudstack/vpcs.py
@@ -0,0 +1,130 @@
+
+#!/usr/bin/env python
+# encoding: utf-8
+
+"""This module contains functions for handling requests in relation to vpcs.
+"""
+
+import uuid
+
+from ec2stack import errors
+from ec2stack import helpers
+from ec2stack.providers import cloudstack
+from ec2stack.providers.cloudstack import requester
+
+
+@helpers.authentication_required
+def create_vpc():
+    """
+    Create a vpc.
+
+    @return: Response.
+    """
+    response = _create_vpc_request()
+    return _create_vpc_response(response)
+
+
+def _create_vpc_request():
+    """
+    Request to create a vpc.
+
+    @return: Response.
+    """
+    args = {'command': 'createVPC'}
+    id = uuid.uuid1()
+    args['name'] = id
+    args['id'] = id
+    args['displaytext'] = id
+    args['cidr'] = helpers.get('CidrBlock')
+
+    response = requester.make_request(args)
+
+    response = response['createvpcresponse']
+
+    return response
+
+
+def _create_vpc_response(response):
+    """
+    Generates a response for create vpc request.
+
+    @param response: Response from Cloudstack.
+    @return: Response.
+    """
+    if 'errortext' in response:
+        errors.invalid_vpc_range()
+    else:
+        response = response['vpc']
+        return {
+            'template_name_or_list': 'create_vpc.xml',
+            'response_type': 'CreateVpcResponse',
+            'response': response
+        }
+
+@helpers.authentication_required
+def delete_vpc():
+    """
+    Delete a vpc.
+
+    @return: Response.
+    """
+    helpers.require_parameters(['VpcId'])
+    _delete_vpc_request()
+    return _delete_vpc_response()
+
+
+def _delete_vpc_request():
+    """
+    Request to delete a vpc.
+
+    @return: Response.
+    """
+    args = {'command': 'deleteVPC', 'id': helpers.get('VpcId')}
+
+    response = requester.make_request(args)
+
+    return response
+
+
+def _delete_vpc_response():
+    """
+    Generates a response for delete vpc request.
+
+    @return: Response.
+    """
+    return {
+        'template_name_or_list': 'status.xml',
+        'response_type': 'DeleteVpcResponse',
+        'return': 'true'
+    }
+
+@helpers.authentication_required
+def describe_vpcs():
+    """
+    Describes a specific vpc or all vpcs.
+
+    @return: Response.
+    """
+    args = {'command': 'listVPCs'}
+    response = cloudstack.describe_item(
+        args, 'vpc', {}, 'vpcId'
+    )
+
+    return _describe_vpc_response(
+        response
+    )
+
+
+def _describe_vpc_response(response):
+    """
+    Generates a response for describe vpc request.
+
+    @param response: Response from Cloudstack.
+    @return: Response.
+    """
+    return {
+        'template_name_or_list': 'vpcs.xml',
+        'response_type': 'DescribeVpcsResponse',
+        'response': response
+    }
+

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/95150953/ec2stack/templates/create_vpc.xml
----------------------------------------------------------------------
diff --git a/ec2stack/templates/create_vpc.xml b/ec2stack/templates/create_vpc.xml
index 99f8624..a708e72 100644
--- a/ec2stack/templates/create_vpc.xml
+++ b/ec2stack/templates/create_vpc.xml
@@ -2,7 +2,7 @@
 {% block response_content %}
    <vpc>
       <vpcId>{{ vpc.id }}</vpcId>
-      <state>{{ vpc.state}}</state>
+      <state>{{ vpc.state }}</state>
       <cidrBlock>{{ vpc.cidr }}</cidrBlock>
       <tagSet/>
    </vpc>

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/95150953/ec2stack/templates/vpcs.xml
----------------------------------------------------------------------
diff --git a/ec2stack/templates/vpcs.xml b/ec2stack/templates/vpcs.xml
index 036e1bb..5eb9269 100644
--- a/ec2stack/templates/vpcs.xml
+++ b/ec2stack/templates/vpcs.xml
@@ -4,7 +4,7 @@
         {% for vpc in response.vpc %}
         <item>
             <vpcId>{{ vpc.id }}</vpcId>
-            <state>{{ vpc.state}}</state>
+            <state>{{ vpc.state }}</state>
             <cidrBlock>{{ vpc.cidr }}</cidrBlock>
             <tagSet/>
         </item>


[33/50] cloudstack-ec2stack git commit: Remove instance disk - always use same sutom disk

Posted by se...@apache.org.
Remove instance disk - always use same sutom disk


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/3d419b8c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/3d419b8c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/3d419b8c

Branch: refs/heads/master
Commit: 3d419b8c1e5c47d377d1faeb5206ebe4d1ecaa37
Parents: 9335852
Author: BroganD1993 <da...@hotmail.com>
Authored: Mon Aug 18 18:40:21 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Mon Aug 18 18:40:21 2014 +0100

----------------------------------------------------------------------
 ec2stack/configure.py                      |  10 ---
 ec2stack/providers/cloudstack/instances.py |  11 +--
 pylint.rc                                  |   2 +-
 tests/instances_tests.py                   | 112 ++++++++++++++++++++++++
 4 files changed, 116 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3d419b8c/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index 5c4ffee..cc2e6f6 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -168,16 +168,6 @@ def _set_optional_attributes_of_profile(config, profile):
     @param profile: the profile to set the attribute in.
     @return: configparser configuration.
     """
-
-    configure_instance_disk = raw_input(
-        'Do you wish to input a second custom storage disk for instances? (Yes/No): '
-    )
-
-    if configure_instance_disk.lower() in ['yes', 'y']:
-        config = _set_attribute_of_profile(
-            config, profile, 'cloudstack_instance_custom_disk_offering', 'Cloudstack custom instance disk offering name', 'CustomInstance'
-        )
-
     configure_instance_type_mapings = raw_input(
         'Do you wish to input instance type mappings? (Yes/No): '
     )

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3d419b8c/ec2stack/providers/cloudstack/instances.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/instances.py b/ec2stack/providers/cloudstack/instances.py
index 3e8115b..01d2127 100644
--- a/ec2stack/providers/cloudstack/instances.py
+++ b/ec2stack/providers/cloudstack/instances.py
@@ -178,14 +178,9 @@ def _run_instance_request():
     if helpers.get('BlockDeviceMapping.1.Ebs.VolumeType') is not None:
         disk_type = helpers.get('BlockDeviceMapping.1.Ebs.VolumeType')
         if disk_type == 'gp2':
-             if 'CLOUDSTACK_INSTANCE_CUSTOM_DISK_OFFERING' in current_app.config:
-                args['diskofferingid'] = disk_offerings.get_disk_offering(
-                    current_app.config['CLOUDSTACK_INSTANCE_CUSTOM_DISK_OFFERING']
-                )['id']
-             else:
-                errors.invalid_request(
-                    "Unable to configure secondary disk, please run ec2stack-configure and choose to "
-                    "configure an instance disk")
+            args['diskofferingid'] = disk_offerings.get_disk_offering(
+                current_app.config['CLOUDSTACK_CUSTOM_DISK_OFFERING']
+            )['id']
 
         if helpers.get('BlockDeviceMapping.1.Ebs.VolumeSize') is None:
             errors.invalid_request("VolumeSize not found in BlockDeviceMapping")

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3d419b8c/pylint.rc
----------------------------------------------------------------------
diff --git a/pylint.rc b/pylint.rc
index c45bc02..1819a65 100644
--- a/pylint.rc
+++ b/pylint.rc
@@ -236,7 +236,7 @@ max-locals=20
 max-returns=6
 
 # Maximum number of branch for function / method body
-max-branchs=12
+max-branches=16
 
 # Maximum number of statements in function / method body
 max-statements=50

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3d419b8c/tests/instances_tests.py
----------------------------------------------------------------------
diff --git a/tests/instances_tests.py b/tests/instances_tests.py
index f1986c2..a53fa0b 100644
--- a/tests/instances_tests.py
+++ b/tests/instances_tests.py
@@ -315,6 +315,118 @@ class InstancesTestCase(Ec2StackAppTestCase):
         self.assert_ok(response)
         assert 'RunInstancesResponse' in response.data
 
+    def test_run_instance_gp2(self):
+        data = self.get_example_data()
+        data['Action'] = 'RunInstances'
+        data['ImageId'] = 'a32d70ee-95e4-11e3-b2e4-d19c9d3e5e1d'
+        data['MinCount'] = '0'
+        data['MaxCount'] = '0'
+        data['SecurityGroupId.1'] = 'example-security-group-id'
+        data['SecurityGroup.1'] = 'example-security-group-name'
+        data['KeyName'] = 'example-ssh-key-name'
+        data['UserData'] = 'example-user-data'
+        data['BlockDeviceMapping.1.Ebs.VolumeType'] = 'gp2'
+        data['BlockDeviceMapping.1.Ebs.VolumeSize'] = '20'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_run_instance.json'
+        )
+        get.return_value.status_code = 200
+
+        get_disk_offering = mock.Mock()
+        get_disk_offering.return_value = json.loads(read_file(
+            'tests/data/disk_offering_search.json'
+        ))
+
+        get_service_offering = mock.Mock()
+        get_service_offering.return_value = json.loads(read_file(
+            'tests/data/service_offering_search.json'
+        ))
+
+        get_zone = mock.Mock()
+        get_zone.return_value = json.loads(read_file(
+            'tests/data/zones_search.json'
+        ))
+
+        with mock.patch('requests.get', get):
+            with mock.patch(
+                    'ec2stack.providers.cloudstack.disk_offerings.get_disk_offering',
+                    get_disk_offering
+            ):
+                with mock.patch(
+                        'ec2stack.providers.cloudstack.service_offerings.get_service_offering',
+                        get_service_offering
+                ):
+                    with mock.patch(
+                            'ec2stack.providers.cloudstack.zones.get_zone',
+                            get_zone
+                    ):
+                        response = self.post(
+                            '/',
+                            data=data
+                        )
+
+        self.assert_ok(response)
+        assert 'RunInstancesResponse' in response.data
+
+    def test_run_instance_gp2_no_volume_size(self):
+        data = self.get_example_data()
+        data['Action'] = 'RunInstances'
+        data['ImageId'] = 'a32d70ee-95e4-11e3-b2e4-d19c9d3e5e1d'
+        data['MinCount'] = '0'
+        data['MaxCount'] = '0'
+        data['SecurityGroupId.1'] = 'example-security-group-id'
+        data['SecurityGroup.1'] = 'example-security-group-name'
+        data['KeyName'] = 'example-ssh-key-name'
+        data['UserData'] = 'example-user-data'
+        data['BlockDeviceMapping.1.Ebs.VolumeType'] = 'gp2'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_run_instance.json'
+        )
+        get.return_value.status_code = 200
+
+        get_disk_offering = mock.Mock()
+        get_disk_offering.return_value = json.loads(read_file(
+            'tests/data/disk_offering_search.json'
+        ))
+
+        get_service_offering = mock.Mock()
+        get_service_offering.return_value = json.loads(read_file(
+            'tests/data/service_offering_search.json'
+        ))
+
+        get_zone = mock.Mock()
+        get_zone.return_value = json.loads(read_file(
+            'tests/data/zones_search.json'
+        ))
+
+        with mock.patch('requests.get', get):
+            with mock.patch(
+                    'ec2stack.providers.cloudstack.disk_offerings.get_disk_offering',
+                    get_disk_offering
+            ):
+                with mock.patch(
+                        'ec2stack.providers.cloudstack.service_offerings.get_service_offering',
+                        get_service_offering
+                ):
+                    with mock.patch(
+                            'ec2stack.providers.cloudstack.zones.get_zone',
+                            get_zone
+                    ):
+                        response = self.post(
+                            '/',
+                            data=data
+                        )
+
+        self.assert_bad_request(response)
+        assert 'VolumeSize not found in BlockDeviceMapping' in response.data
+
+
     def test_run_instance_with_zone_and_type_(self):
         data = self.get_example_data()
         data['Action'] = 'RunInstances'


[25/50] cloudstack-ec2stack git commit: Merge branch 'snapshot_support', closes #54

Posted by se...@apache.org.
Merge branch 'snapshot_support', closes #54


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/0aafa6d4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/0aafa6d4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/0aafa6d4

Branch: refs/heads/master
Commit: 0aafa6d4e949f00f773ed371aa3bd9322796a991
Parents: 4a4fc3c 873bf65
Author: BroganD1993 <da...@hotmail.com>
Authored: Sun Aug 10 15:27:43 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Sun Aug 10 15:27:43 2014 +0100

----------------------------------------------------------------------
 ec2stack/controllers/default.py                 |   5 +-
 ec2stack/providers/cloudstack/snapshots.py      | 126 +++++++++++++++++++
 ec2stack/templates/create_snapshot.xml          |   8 ++
 ec2stack/templates/snapshots.xml                |  12 ++
 ...nvalid_create_snapshot_volume_not_found.json |   8 ++
 tests/data/invalid_create_tag_invalid_id.json   |  17 ---
 tests/data/invalid_create_tag_not_found.json    |  17 +++
 ...alid_delete_snapshot_snapshot_not_found.json |   8 ++
 .../data/invalid_delete_tag_invalid_tag_id.json |  17 ---
 .../data/invalid_delete_tag_tag_not_found.json  |  17 +++
 .../invalid_describe_image_image_not_found.json |   8 ++
 ...invalid_describe_image_invalid_image_id.json |   8 --
 ...alid_describe_volume_instance_not_found.json |   3 +
 ...lid_describe_volume_invalid_instance_id.json |   3 -
 tests/data/valid_create_snapshot.json           |  25 ++++
 tests/data/valid_create_volume.json             |  38 ++++++
 tests/data/valid_create_volume_response.json    |  38 ------
 tests/data/valid_delete_snapshot.json           |  16 +++
 tests/data/valid_describe_snapshot.json         |  16 +++
 tests/data/valid_describe_snapshots.json        |  25 ++++
 tests/disk_offering_tests.py                    |   2 +-
 tests/snapshot_tests.py                         | 119 ++++++++++++++++++
 tests/tags_tests.py                             |   4 +-
 tests/volume_tests.py                           |   4 +-
 tests/zones_tests.py                            |   2 +-
 25 files changed, 456 insertions(+), 90 deletions(-)
----------------------------------------------------------------------



[16/50] cloudstack-ec2stack git commit: Upgrade to alpha

Posted by se...@apache.org.
Upgrade to alpha


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/055932ed
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/055932ed
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/055932ed

Branch: refs/heads/master
Commit: 055932edd9e71c0ce56d698b4c97b5123558c5e2
Parents: 6322730
Author: BroganD1993 <da...@hotmail.com>
Authored: Sun Jul 20 14:43:32 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Sun Jul 20 14:43:32 2014 +0100

----------------------------------------------------------------------
 HISTORY.rst | 2 ++
 setup.py    | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/055932ed/HISTORY.rst
----------------------------------------------------------------------
diff --git a/HISTORY.rst b/HISTORY.rst
index 5e90e9e..7b17ece 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -8,6 +8,8 @@ __________________
     * createVpc
     * deleteVpc
     * listVpc
+* Clean test data
+* Upgrade to Alpha
 
 0.5.0 (9-07-2014)
 _________________

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/055932ed/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 68fd134..5c4a7f8 100644
--- a/setup.py
+++ b/setup.py
@@ -52,7 +52,7 @@ setup(
     zip_safe=False,
     install_requires=REQUIRES,
     classifiers=[
-        'Development Status :: 2 - Pre-Alpha',
+        'Development Status :: 3 - Alpha',
         'Environment :: Console',
         'Intended Audience :: System Administrators',
         'License :: OSI Approved :: Apache Software License',
@@ -67,5 +67,5 @@ setup(
         ec2stack-configure = ec2stack.configure:main
         ec2stack-register = ec2stack.secretkey_manager:register
         ec2stack-remove = ec2stack.secretkey_manager:remove
-    """,
+    """
 )


[04/50] cloudstack-ec2stack git commit: Begin addition of VPC support

Posted by se...@apache.org.
Begin addition of VPC support


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/2260ea07
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/2260ea07
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/2260ea07

Branch: refs/heads/master
Commit: 2260ea07afc5d5c3cacff7c749b47aa2f8b603f0
Parents: 252e43e
Author: BroganD1993 <da...@hotmail.com>
Authored: Tue Jul 15 19:43:55 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Tue Jul 15 19:43:55 2014 +0100

----------------------------------------------------------------------
 ec2stack/errors.py                        |  12 +++
 ec2stack/providers/cloudstack/keypairs.py |   4 +-
 ec2stack/providers/cloudstack/volumes.py  |   2 +-
 ec2stack/providers/cloudstack/vpc.py      | 129 +++++++++++++++++++++++++
 4 files changed, 144 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2260ea07/ec2stack/errors.py
----------------------------------------------------------------------
diff --git a/ec2stack/errors.py b/ec2stack/errors.py
index bf5040a..e7841eb 100644
--- a/ec2stack/errors.py
+++ b/ec2stack/errors.py
@@ -162,6 +162,18 @@ def invalid_resource_id():
         'The specified ID for the resource you are trying to tag is not valid.'
     )
 
+def invalid_vpc_range():
+    """
+    Invalid cidr block.
+
+    @raise Ec2stackError: Defining a bad request and message.
+    """
+    raise Ec2stackError(
+        '400',
+        'InvalidVpcRange',
+        'The specified CIDR block range is not valid.'
+    )
+
 
 def duplicate_security_group():
     """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2260ea07/ec2stack/providers/cloudstack/keypairs.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/keypairs.py b/ec2stack/providers/cloudstack/keypairs.py
index d552b60..2a9ff7e 100644
--- a/ec2stack/providers/cloudstack/keypairs.py
+++ b/ec2stack/providers/cloudstack/keypairs.py
@@ -6,10 +6,10 @@
 
 from base64 import b64decode
 
-from ec2stack.providers import cloudstack
+from ec2stack import errors
 from ec2stack import helpers
+from ec2stack.providers import cloudstack
 from ec2stack.providers.cloudstack import requester
-from ec2stack import errors
 
 
 @helpers.authentication_required

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2260ea07/ec2stack/providers/cloudstack/volumes.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/volumes.py b/ec2stack/providers/cloudstack/volumes.py
index 4f823f0..ec594bb 100644
--- a/ec2stack/providers/cloudstack/volumes.py
+++ b/ec2stack/providers/cloudstack/volumes.py
@@ -107,7 +107,7 @@ def _create_volume_request():
 
     args['zoneid'] = zone_id
     args['command'] = 'createVolume'
-    args['name'] = uuid.uuid4()
+    args['name'] = uuid.uuid()
 
     response = requester.make_request_async(args)
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2260ea07/ec2stack/providers/cloudstack/vpc.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/vpc.py b/ec2stack/providers/cloudstack/vpc.py
new file mode 100644
index 0000000..440b875
--- /dev/null
+++ b/ec2stack/providers/cloudstack/vpc.py
@@ -0,0 +1,129 @@
+
+#!/usr/bin/env python
+# encoding: utf-8
+
+"""This module contains functions for handling requests in relation to vpcs.
+"""
+
+import uuid
+
+from ec2stack import errors
+from ec2stack import helpers
+from ec2stack.providers import cloudstack
+from ec2stack.providers.cloudstack import requester
+
+
+@helpers.authentication_required
+def create_vpc():
+    """
+    Create a vpc.
+
+    @return: Response.
+    """
+    response = _create_vpc_request()
+    return _create_vpc_response(response)
+
+
+def _create_vpc_request():
+    """
+    Request to create a vpc.
+
+    @return: Response.
+    """
+    args = {'command': 'createVPC'}
+    name = uuid.uuid()
+    args['name'] = name
+    args['id'] = name
+    args['cidr'] = helpers.get('CidrBlock')
+
+    response = requester.make_request(args)
+
+    response = response['createvpcresponse']
+
+    return response
+
+
+def _create_vpc_response(response):
+    """
+    Generates a response for create vpc request.
+
+    @param response: Response from Cloudstack.
+    @return: Response.
+    """
+    if 'errortext' in response:
+        errors.invalid_vpc_range()
+    else:
+        response = response['vpc']
+        return {
+            'template_name_or_list': 'create_vpc.xml',
+            'response_type': 'CreateVpcResponse',
+            'response': response
+        }
+
+@helpers.authentication_required
+def delete_vpc():
+    """
+    Delete a vpc.
+
+    @return: Response.
+    """
+    helpers.require_parameters(['VpcId'])
+    _delete_vpc_request()
+    return _delete_vpc_response()
+
+
+def _delete_vpc_request():
+    """
+    Request to delete a vpc.
+
+    @return: Response.
+    """
+    args = {'command': 'deleteVPC', 'id': helpers.get('VpcId')}
+
+    response = requester.make_request(args)
+
+    return response
+
+
+def _delete_vpc_response():
+    """
+    Generates a response for delete vpc request.
+
+    @return: Response.
+    """
+    return {
+        'template_name_or_list': 'status.xml',
+        'response_type': 'DeleteVpcResponse',
+        'return': 'true'
+    }
+
+@helpers.authentication_required
+def describe_vpcs():
+    """
+    Describes a specific vpc or all vpcs.
+
+    @return: Response.
+    """
+    args = {'command': 'listVPCs'}
+    response = cloudstack.describe_item(
+        args, 'vpc', {}, 'vpcId'
+    )
+
+    return _describe_vpc_response(
+        response
+    )
+
+
+def _describe_vpc_response(response):
+    """
+    Generates a response for describe vpc request.
+
+    @param response: Response from Cloudstack.
+    @return: Response.
+    """
+    return {
+        'template_name_or_list': 'vpcs.xml',
+        'response_type': 'DescribeVpcsResponse',
+        'response': response
+    }
+


[42/50] cloudstack-ec2stack git commit: remove vagrant stuff, hasn't been tested in ages

Posted by se...@apache.org.
remove vagrant stuff, hasn't been tested in ages


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/4d30d0e8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/4d30d0e8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/4d30d0e8

Branch: refs/heads/master
Commit: 4d30d0e872203bcf3686b43ce9c48fb9f85d7125
Parents: 2cec77c
Author: Ian Duffy <ia...@ianduffy.ie>
Authored: Thu Dec 4 14:09:20 2014 +0000
Committer: Ian Duffy <ia...@ianduffy.ie>
Committed: Thu Dec 4 14:09:20 2014 +0000

----------------------------------------------------------------------
 VagrantFile                                     |  16 ---
 puppet/files/alias.sh                           |   4 -
 puppet/files/virtualenv.sh                      |   5 -
 puppet/hiera.yaml                               |   6 -
 puppet/manifests/ec2stack.pp                    | 127 -------------------
 puppet/modules/rpmrepos/LICENSE.md              |  13 --
 puppet/modules/rpmrepos/Modulefile              |   8 --
 puppet/modules/rpmrepos/README.md               |  90 -------------
 .../modules/rpmrepos/files/RPM-GPG-KEY-EPEL-5   |  30 -----
 .../modules/rpmrepos/files/RPM-GPG-KEY-EPEL-6   |  29 -----
 .../rpmrepos/files/RPM-GPG-KEY-rpmforge-dag     |  32 -----
 .../rpmrepos/lib/facter/os_maj_version.rb       |  11 --
 puppet/modules/rpmrepos/manifests/epel.pp       |  96 --------------
 puppet/modules/rpmrepos/manifests/init.pp       |  20 ---
 .../modules/rpmrepos/manifests/rpm_gpg_key.pp   |  10 --
 puppet/modules/rpmrepos/manifests/rpmforge.pp   |  57 ---------
 puppet/modules/rpmrepos/metadata.json           |  30 -----
 puppet/modules/rpmrepos/tests/init.pp           |   3 -
 18 files changed, 587 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/VagrantFile
----------------------------------------------------------------------
diff --git a/VagrantFile b/VagrantFile
deleted file mode 100644
index a09afd5..0000000
--- a/VagrantFile
+++ /dev/null
@@ -1,16 +0,0 @@
-Vagrant.configure("2") do |config|
-
-  config.vm.box = "CentOS65"
-  config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.5-x86_64-v20140110.box"
-
-  config.vm.hostname = "ec2stack.dev"
-  config.vm.network "private_network", ip: "192.168.0.50"
-
-  config.vm.provision :puppet do |puppet|
-      puppet.module_path = "puppet/modules"
-      puppet.manifests_path = "puppet/manifests"
-      puppet.manifest_file = "ec2stack.pp"
-      puppet.options = "--hiera_config /vagrant/puppet/hiera.yaml"
-   end
-
-end

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/files/alias.sh
----------------------------------------------------------------------
diff --git a/puppet/files/alias.sh b/puppet/files/alias.sh
deleted file mode 100644
index b824641..0000000
--- a/puppet/files/alias.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-alias shasum="sha1sum"
-alias aws="aws --debug --output json --color on --no-verify-ssl"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/files/virtualenv.sh
----------------------------------------------------------------------
diff --git a/puppet/files/virtualenv.sh b/puppet/files/virtualenv.sh
deleted file mode 100644
index 914b858..0000000
--- a/puppet/files/virtualenv.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-export WORKON_HOME=~/.virtualenvs
-mkdir -p $WORKON_HOME
-. /usr/bin/virtualenvwrapper.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/hiera.yaml
----------------------------------------------------------------------
diff --git a/puppet/hiera.yaml b/puppet/hiera.yaml
deleted file mode 100644
index 3ff857b..0000000
--- a/puppet/hiera.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-:backends: yaml
-:yaml:
-  :datadir: /var/lib/hiera
-:hierarchy: common
-:logger: console

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/manifests/ec2stack.pp
----------------------------------------------------------------------
diff --git a/puppet/manifests/ec2stack.pp b/puppet/manifests/ec2stack.pp
deleted file mode 100644
index 0054358..0000000
--- a/puppet/manifests/ec2stack.pp
+++ /dev/null
@@ -1,127 +0,0 @@
-group {
-  "puppet": ensure => "present"
-}
-
-Exec {
-path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/",
-"/usr/local/bin"]
-}
-
-stage { 'pre':
-  before => Stage['main']
-}
-
-class { 'baseconfig':
-  stage => 'pre'
-}
-
-class baseconfig {
-exec { "Update the system":
-  command => "/usr/bin/yum -y update"
-}
-
-$packages = [ "zlib-devel", "bzip2-devel", "openssl-devel", "ncurses-devel", "mysql-devel", "libxml2-devel", "libxslt-devel", "unixODBC-devel", "sqlite", "sqlite-devel", "wget", "git" ]
-
-package {
-  $packages: ensure => "installed"
-}
-
-exec { "Install Development Tools":
-  unless  => "yum grouplist 'Development tools' | /bin/grep '^Installed Groups'",
-  command => "yum -y groupinstall 'Development tools'",
-}
-}
-
-class ec2stack {
-exec { "Install Python 2.7":
-  command => "rm -rf Python-2.7.4* && wget --no-check-certificate http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tar.bz2 && tar xf Python-2.7.4.tar.bz2 && cd Python-2.7.4 && ./configure --prefix=/usr/local && make && make altinstall",
-  cwd => "/tmp",
-  unless => "which python2.7",
-  timeout => 60 * 20,
-  tries => 5,
-  try_sleep => 30
-}
-
-exec { "Install distribute 0.6.10 for Python 2.6":
-  command => "rm -rf distribute-* && wget --no-check-certificate http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz && tar -xvzf distribute-0.6.10.tar.gz && cd distribute-0.6.10 && python2.6 setup.py install",
-  cwd => "/tmp",
-  unless => "which easy_install-2.6",
-  timeout => 60 * 10,
-  tries => 5,
-  try_sleep => 30
-}
-
-exec { "Install distribute 0.6.10 for Python 2.7":
-  command => "rm -rf distribute-* && wget --no-check-certificate http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz && tar -xvzf distribute-0.6.10.tar.gz && cd distribute-0.6.10 && python2.7 setup.py install",
-  cwd => "/tmp",
-  require => [ Exec["Install Python 2.7"] ],
-  unless => "which easy_install-2.7",
-  timeout => 60 * 10,
-  tries => 5,
-  try_sleep => 30
-}
-
-exec { "Install virtualenv 1.9.1 for Python 2.6":
-  command => "rm -rf virtualenv-* && wget --no-check-certificate https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz#md5=07e09df0adfca0b2d487e39a4bf2270a && tar -xvzf virtualenv-1.9.1.tar.gz && cd virtualenv-1.9.1 && python2.6 setup.py install",
-  cwd => "/tmp",
-  require => [ Exec["Install distribute 0.6.10 for Python 2.6"] ],
-  unless => "which virtualenv-2.6",
-  timeout => 60 * 10,
-  tries => 5,
-  try_sleep => 30
-}
-
-exec { "Install virtualenvwrapper 4.0 for Python 2.6":
-  command => "rm -rf virtualenvwrapper-* && wget --no-check-certificate https://pypi.python.org/packages/source/v/virtualenvwrapper/virtualenvwrapper-4.0.tar.gz#md5=78df3b40735e959479d9de34e4b8ba15 && tar -xvzf virtualenvwrapper-4.0.tar.gz && cd virtualenvwrapper-4.0 && python2.6 setup.py install",
-  cwd => "/tmp",
-  require => [ Exec["Install virtualenv 1.9.1 for Python 2.6"] ],
-  unless => "which virtualenvwrapper.sh",
-  timeout => 60 * 10,
-  tries => 5,
-  try_sleep => 30
-}
-
-exec { "Install pep8 for Python 2.6":
-  command => "easy_install pep8",
-  cwd => "/tmp",
-  require => [ Exec["Install distribute 0.6.10 for Python 2.6"] ],
-  unless => "which pep8",
-  timeout => 60 * 10,
-  tries => 5,
-  try_sleep => 30
-}
-
-exec { "Install pylint for Python 2.6":
-  command => "easy_install pylint",
-  require => [ Exec["Install distribute 0.6.10 for Python 2.6"] ],
-  unless => "which pylint",
-  timeout => 60 * 10,
-  tries => 5,
-  try_sleep => 30
-}
-
-exec { "Install awscli for Python2.6":
-  command => "easy_install awscli",
-  require => [ Exec["Install distribute 0.6.10 for Python 2.6"] ],
-  unless => "which aws",
-  timeout => 60 * 10,
-  tries => 5,
-  try_sleep => 30
-}
-
-file {
-  "/etc/profile.d/virtualenv.sh":
-  ensure => present,
-  source => "file:///vagrant/puppet/files/virtualenv.sh"
-;
-  "/etc/profile.d/alias.sh":
-  ensure => present,
-  source => "file:///vagrant/puppet/files/alias.sh"
-;
-}
-}
-
-include baseconfig
-include ec2stack
-include rpmrepos::epel
-include rpmrepos::rpmforge

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/LICENSE.md
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/LICENSE.md b/puppet/modules/rpmrepos/LICENSE.md
deleted file mode 100644
index 2cc3438..0000000
--- a/puppet/modules/rpmrepos/LICENSE.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright [2013] [Chad Metcalf]
-
-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.

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/Modulefile
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/Modulefile b/puppet/modules/rpmrepos/Modulefile
deleted file mode 100644
index 46cd42a..0000000
--- a/puppet/modules/rpmrepos/Modulefile
+++ /dev/null
@@ -1,8 +0,0 @@
-name    'metcalfc-rpmrepos'
-version '0.0.1'
-source 'http://github.com/metcalfc/puppet-rpmrepos'
-author 'metcalfc'
-license 'Apache License, Version 2.0'
-summary 'Setup 3rd party RPM repos'
-description 'Setup the various third party repos on Centos/RHEL et all'
-project_page 'http://github.com/metcalfc/puppet-rpmrepos'

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/README.md
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/README.md b/puppet/modules/rpmrepos/README.md
deleted file mode 100644
index e2e3ad4..0000000
--- a/puppet/modules/rpmrepos/README.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# History
-
-Michael Stahnke wrote [puppet-module-epel](https://github.com/stahnma/puppet-module-epel).
-Lee Boynton followed up with [puppet-rpmforge](https://github.com/lboynton/puppet-rpmforge)
-which has a dependancy on `puppet-module-epel` for a fact and rpm key
-importing.
-
-It seems like managing third party repos is a common task. If we're going to
-have a cross module dependancy we might as well merge the modules.
-
-# Why?
-
-EPEL and RepoForge are two common third party RPM repositories. To parrot
-Michael Stahnke,  "I just got sick of coding Puppet modules and basically
-having an assumption that EPEL was setup or installed.  I can now depend on
-this module instead."
-
-There are also some packages which don't play nicely between the two
-(nagios-plugins comes to mind) and when possible that has been captured here.
-
-# Configure EPEL (Extra Repository for Enterprise Linux)
-
-`include rpmrepos::epel`
-
-## About
-This module basically just mimics the epel-release rpm. The same
-repos are enabled/disabled and the GPG key is imported.  In the end you will
-end up with the EPEL repos configured.
-
-The following Repos will be setup and enabled by default:
-
-  * epel
-
-Other repositories that will setup but disabled (as per the epel-release
-setup)
-
-  * epel-debuginfo
-  * epel-source
-  * epel-testing
-  * epel-testing-debuginfo
-  * epel-testing-source
-
-You can enable them using class parameters (`testing => true`).
-
-## Proxy
-If you have an http proxy required to access the internet, you can
-use the $proxy variable in the class parameters. If it is set to a value other
-than 'absent' a proxy will be setup with each repository.  Note that otherwise
-each of the repos will fall back to settings in the /etc/yum.conf file.
-
-# Configure RepoForge
-
-`include rpmrepos::rpmforge`
-
-## About
-This module basically just mimics the rpmforge-release rpm. The same
-repos are enabled/disabled and the GPG key is imported.  In the end you will
-end up with the RepoForge (aka RPMForge) repos configured.
-
-The following Repos will be setup and enabled by default:
-
-  * rpmforge
-
-Other repositories that will setup but disabled (as per the rpmforge-release
-setup)
-
-  * rpmforge-extras
-  * rpmforge-testing
-
-You can enable them using class parameters (`testing => '1'`).
-
-## Proxy
-If you have an http proxy required to access the internet, you can
-use the $proxy variable in the class parameters. If it is set to a value other
-than 'absent' a proxy will be setup with each repository.  Note that otherwise
-each of the repos will fall back to settings in the /etc/yum.conf file.
-
-# Futher Information
-
-* [EPEL Wiki](http://fedoraproject.org/wiki/EPEL)
-* [epel-release package information](http://mirrors.servercentral.net/fedora/epel/6/i386/repoview/epel-release.html)
-* [RepoForge](http://repoforge.org/use/)
-
-# Testing
-
-* This was tested using Puppet 2.7.x on Centos5/6 I assume it will work on any
-* RHEL variant Also, I think this should work with earlier versions of Puppet
-* (2.6.x at least)
-
-# License Apache Software License 2.0

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/files/RPM-GPG-KEY-EPEL-5
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/files/RPM-GPG-KEY-EPEL-5 b/puppet/modules/rpmrepos/files/RPM-GPG-KEY-EPEL-5
deleted file mode 100644
index 5a13bb4..0000000
--- a/puppet/modules/rpmrepos/files/RPM-GPG-KEY-EPEL-5
+++ /dev/null
@@ -1,30 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.2.6 (GNU/Linux)
-
-mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF
-l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/
-QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/
-lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk
-/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm
-l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl
-1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic
-vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP
-QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ
-RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM
-AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa
-ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/
-blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J
-nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl
-PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3
-5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS
-w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd
-yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA
-DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1
-axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H
-Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T
-P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24
-0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC
-GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY
-bbsLFWOfmzAnNIGvFRWy+YHi
-=MMNL
------END PGP PUBLIC KEY BLOCK-----

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/files/RPM-GPG-KEY-EPEL-6
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/files/RPM-GPG-KEY-EPEL-6 b/puppet/modules/rpmrepos/files/RPM-GPG-KEY-EPEL-6
deleted file mode 100644
index 7a20304..0000000
--- a/puppet/modules/rpmrepos/files/RPM-GPG-KEY-EPEL-6
+++ /dev/null
@@ -1,29 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.5 (GNU/Linux)
-
-mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1
-JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B
-M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn
-XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6
-pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV
-QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp
-Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq
-3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu
-vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar
-1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g
-YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB
-tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS
-KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9
-qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT
-9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP
-Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS
-WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft
-HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF
-p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP
-x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8
-wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J
-l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG
-iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR
-XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ==
-=V/6I
------END PGP PUBLIC KEY BLOCK-----

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/files/RPM-GPG-KEY-rpmforge-dag
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/files/RPM-GPG-KEY-rpmforge-dag b/puppet/modules/rpmrepos/files/RPM-GPG-KEY-rpmforge-dag
deleted file mode 100644
index 8ee27f4..0000000
--- a/puppet/modules/rpmrepos/files/RPM-GPG-KEY-rpmforge-dag
+++ /dev/null
@@ -1,32 +0,0 @@
-The following public key can be used to verify RPM packages
-downloaded from  http://dag.wieers.com/apt/  using 'rpm -K'
-if you have the GNU GPG package.
-Questions about this key should be sent to:
-Dag Wieers <da...@wieers.com>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.2.1 (GNU/Linux)
-
-mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6
-TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF
-5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3
-3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq
-39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN
-8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm
-30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD
-oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170
-JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy
-cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT
-EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST
-hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF
-Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon
-g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt
-llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l
-IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg
-6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh
-Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L
-n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I
-RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE
-BACeJU1hpElFnUZCL4yKj4EuLnlo8kc=
-=mqUt
------END PGP PUBLIC KEY BLOCK-----

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/lib/facter/os_maj_version.rb
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/lib/facter/os_maj_version.rb b/puppet/modules/rpmrepos/lib/facter/os_maj_version.rb
deleted file mode 100644
index 9f90d1d..0000000
--- a/puppet/modules/rpmrepos/lib/facter/os_maj_version.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# This is a simple fact to get the Major version of an OS without having to
-# have the entire LSB suite installed.  LSB seems to pull in about 300 megs of
-# stuff I often don't require. This fact is quick to load so it shouldn't be
-# much of an issue.
-
-Facter.add(:os_maj_version) do
-  v = Facter.value(:operatingsystemrelease)
-  setcode do
-    v.split('.')[0].strip
-  end
-end

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/manifests/epel.pp
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/manifests/epel.pp b/puppet/modules/rpmrepos/manifests/epel.pp
deleted file mode 100644
index aa79be9..0000000
--- a/puppet/modules/rpmrepos/manifests/epel.pp
+++ /dev/null
@@ -1,96 +0,0 @@
-# Class epel
-#
-# Actions:
-#   Configure the proper repositories and import GPG keys
-#
-# Reqiures:
-#   You should probably be on an Enterprise Linux variant. (Centos, RHEL, Scientific, Oracle, Ascendos, et al)
-#
-# Sample Usage:
-#  include rpmrepos::epel
-#
-class rpmrepos::epel ($testing           = '0',
-$testing_debuginfo = '0',
-$testing_source    = '0',
-$debuginfo         = '0',
-$source            = '0',
-$proxy             = 'absent') {
-
-if $::osfamily == 'RedHat' and $::operatingsystem != 'Fedora' {
-
-yumrepo { 'epel-testing':
-  baseurl        => "http://download.fedora.redhat.com/pub/epel/testing/${::os_maj_version}/${::architecture}",
-  failovermethod => 'priority',
-  proxy          => $rpmrepos::epel::proxy,
-  enabled        => $rpmrepos::epel::testing,
-  gpgcheck       => '1',
-  gpgkey         => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}",
-  descr          => "Extra Packages for Enterprise Linux ${::os_maj_version} - Testing - ${::architecture} "
-}
-
-yumrepo { 'epel-testing-debuginfo':
-  baseurl        => "http://download.fedora.redhat.com/pub/epel/testing/${::os_maj_version}/${::architecture}/debug",
-  failovermethod => 'priority',
-  proxy          => $rpmrepos::epel::proxy,
-  enabled        => $rpmrepos::epel::testing_debuginfo,
-  gpgcheck       => '1',
-  gpgkey         => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}",
-  descr          => "Extra Packages for Enterprise Linux ${::os_maj_version} - Testing - ${::architecture} - Debug"
-}
-
-yumrepo { 'epel-testing-source':
-  baseurl        => "http://download.fedora.redhat.com/pub/epel/testing/${::os_maj_version}/SRPMS",
-  failovermethod => 'priority',
-  proxy          => $rpmrepos::epel::proxy,
-  enabled        => $rpmrepos::epel::testing_source,
-  gpgcheck       => '1',
-  gpgkey         => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}",
-  descr          => "Extra Packages for Enterprise Linux ${::os_maj_version} - Testing - ${::architecture} - Source"
-}
-
-yumrepo { 'epel':
-  mirrorlist     => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${::os_maj_version}&arch=${::architecture}",
-  failovermethod => 'priority',
-  proxy          => $rpmrepos::epel::proxy,
-  enabled        => '1',
-  gpgcheck       => '1',
-  gpgkey         => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}",
-  descr          => "Extra Packages for Enterprise Linux ${::os_maj_version} - ${::architecture}"
-}
-
-yumrepo { 'epel-debuginfo':
-  mirrorlist     => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-${::os_maj_version}&arch=${::architecture}",
-  failovermethod => 'priority',
-  proxy          => $rpmrepos::epel::proxy,
-  enabled        => $rpmrepos::epel::debuginfo,
-  gpgcheck       => '1',
-  gpgkey         => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}",
-  descr          => "Extra Packages for Enterprise Linux ${::os_maj_version} - ${::architecture} - Debug"
-}
-
-yumrepo { 'epel-source':
-  mirrorlist     => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-${::os_maj_version}&arch=${::architecture}",
-  proxy          => $rpmrepos::epel::proxy,
-  failovermethod => 'priority',
-  enabled        => $rpmrepos::epel::source,
-  gpgcheck       => '1',
-  gpgkey         => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}",
-  descr          => "Extra Packages for Enterprise Linux ${::os_maj_version} - ${::architecture} - Source"
-}
-
-file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}":
-  ensure => present,
-  owner  => 'root',
-  group  => 'root',
-  mode   => '0644',
-  source => "puppet:///modules/rpmrepos/RPM-GPG-KEY-EPEL-${::os_maj_version}",
-}
-
-rpmrepos::rpm_gpg_key{ "EPEL-${::os_maj_version}":
-  path => "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}"
-}
-} else {
-notice ("Your operating system ${::operatingsystem} will not have the EPEL repository applied")
-}
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/manifests/init.pp
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/manifests/init.pp b/puppet/modules/rpmrepos/manifests/init.pp
deleted file mode 100644
index 45957f0..0000000
--- a/puppet/modules/rpmrepos/manifests/init.pp
+++ /dev/null
@@ -1,20 +0,0 @@
-# Class rpmrepos
-#
-# Actions:
-#   Configure the proper repositories and import GPG keys
-#
-# Requires:
-#   You should probably be on an Enterprise Linux variant. (Centos, RHEL, 
-#    Scientific, Oracle, Ascendos, et al)
-#
-# Sample Usage:
-#  include rpmrepos
-#
-# Basic usage doesn't allow for specific repository selection or proxies.
-# If you need them use the classes directly.
-class rpmrepos {
-
-require rpmrepos::epel
-require rpmrepos::rpmforge
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/manifests/rpm_gpg_key.pp
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/manifests/rpm_gpg_key.pp b/puppet/modules/rpmrepos/manifests/rpm_gpg_key.pp
deleted file mode 100644
index d3d698a..0000000
--- a/puppet/modules/rpmrepos/manifests/rpm_gpg_key.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-define rpmrepos::rpm_gpg_key($path) {
-# Given the path to a key, see if it is imported, if not, import it
-exec {  "import-$name":
-  path      => '/bin:/usr/bin:/sbin:/usr/sbin',
-  command   => "rpm --import $path",
-  unless    => "rpm -q gpg-pubkey-$(echo $(gpg --throw-keyids < $path) | cut --characters=11-18 | tr [A-Z] [a-z])",
-  require   => File[$path],
-  logoutput => 'on_failure',
-}
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/manifests/rpmforge.pp
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/manifests/rpmforge.pp b/puppet/modules/rpmrepos/manifests/rpmforge.pp
deleted file mode 100644
index 2187433..0000000
--- a/puppet/modules/rpmrepos/manifests/rpmforge.pp
+++ /dev/null
@@ -1,57 +0,0 @@
-# Class rpmforge
-#
-# Actions:
-#   Configure the proper repositories and import GPG keys
-#
-# Reqiures:
-#   You should probably be on an Enterprise Linux variant. (Centos, RHEL, Scientific, Oracle, Ascendos, et al)
-#
-# Sample Usage:
-#  include rpmrepos::rpmforge
-#
-class rpmrepos::rpmforge ($testing = '0',
-$extras  = '0',
-$proxy   = 'absent') {
-yumrepo { 'rpmforge':
-  baseurl     => "http://apt.sw.be/redhat/el${::os_maj_version}/en/${::architecture}/rpmforge/",
-  mirrorlist  =>  "http://apt.sw.be/redhat/el${::os_maj_version}/en/mirrors-rpmforge",
-  proxy       => $rpmrepos::rpmforge::proxy,
-  enabled     => 1,
-  gpgcheck    => 1,
-  exclude    => ['nagios-plugins-*'],
-  gpgkey      => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag',
-  descr       => "Rpmforge - ${::os_maj_version} - ${::architecture} "
-}
-
-yumrepo { 'rpmforge-extras':
-  baseurl     => "http://apt.sw.be/redhat/el${::os_maj_version}/en/${::architecture}/extras/",
-  mirrorlist  =>  "http://apt.sw.be/redhat/el${::os_maj_version}/en/mirrors-rpmforge-extras",
-  proxy       => $rpmrepos::rpmforge::proxy,
-  enabled     => $rpmrepos::rpmforge::extras,
-  gpgcheck    => 1,
-  gpgkey      => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag',
-  descr       => "Rpmforge - ${::os_maj_version} - Extras - ${::architecture}"
-}
-
-yumrepo { 'rpmforge-testing':
-  baseurl     => "http://apt.sw.be/redhat/el${::os_maj_version}/en/${::architecture}/testing/",
-  mirrorlist  =>  "http://apt.sw.be/redhat/el${::os_maj_version}/en/mirrors-rpmforge-testing",
-  proxy       => $rpmrepos::rpmforge::proxy,
-  enabled     => $rpmrepos::rpmforge::testing,
-  gpgcheck    => 1,
-  gpgkey      => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag',
-  descr       => "Rpmforge - ${::os_maj_version} - Testing - ${::architecture}"
-}
-
-file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag":
-  ensure => present,
-  owner  => 'root',
-  group  => 'root',
-  mode   => '0644',
-  source => "puppet:///modules/rpmrepos/RPM-GPG-KEY-rpmforge-dag",
-}
-
-rpmrepos::rpm_gpg_key{ "rpmforge-dag":
-  path => "/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag",
-}
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/metadata.json
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/metadata.json b/puppet/modules/rpmrepos/metadata.json
deleted file mode 100644
index 0c2ecaf..0000000
--- a/puppet/modules/rpmrepos/metadata.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-    "name": "metcalfc-rpmrepos",
-    "version": "0.0.1",
-    "source": "http://github.com/metcalfc/puppet-rpmrepos",
-    "author": "metcalfc",
-    "license": "Apache License, Version 2.0",
-    "summary": "Setup 3rd party RPM repos",
-    "description": "Setup the various third party repos on Centos/RHEL et all",
-    "project_page": "http://github.com/metcalfc/puppet-rpmrepos",
-    "dependencies": [
-
-    ],
-    "types": [
-
-    ],
-    "checksums": {
-        "LICENSE.md": "defb4db0e0909b7bf4cda51cd88ff708",
-        "Modulefile": "7b8a9d9f63183c0a180814b08c489516",
-        "README.md": "5324ba52be3c3b12905db3fffad4670b",
-        "files/RPM-GPG-KEY-EPEL-5": "0466c259781def56dafe0a2cdc9de0c5",
-        "files/RPM-GPG-KEY-EPEL-6": "d865e6b948a74cb03bc3401c0b01b785",
-        "files/RPM-GPG-KEY-rpmforge-dag": "a44f72c72b873d0f8f3021690bb3e52f",
-        "lib/facter/os_maj_version.rb": "0f19c87eca831a094fe83b1a79937b76",
-        "manifests/epel.pp": "df77b78a5eda939de066475ad7dd395f",
-        "manifests/init.pp": "69c80de477dce309f3f43d48ba516851",
-        "manifests/rpm_gpg_key.pp": "e2da85d84dc3c1eb88408b2907e07771",
-        "manifests/rpmforge.pp": "80203fa2ac453f3b00e2ca541688400c",
-        "tests/init.pp": "cfedfc8a0f1929b0e04d15c2b70835d1"
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/4d30d0e8/puppet/modules/rpmrepos/tests/init.pp
----------------------------------------------------------------------
diff --git a/puppet/modules/rpmrepos/tests/init.pp b/puppet/modules/rpmrepos/tests/init.pp
deleted file mode 100644
index 4aaf0ee..0000000
--- a/puppet/modules/rpmrepos/tests/init.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-# And by test, I mean, run this thing for me using Puppet apply and I'll check
-# it out.
-include 'rpmrepos'


[41/50] cloudstack-ec2stack git commit: Editing the readme with docker instructions

Posted by se...@apache.org.
Editing the readme with docker instructions


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/2cec77cf
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/2cec77cf
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/2cec77cf

Branch: refs/heads/master
Commit: 2cec77cff319ed2ed50024a60a3ed12fe9dc5283
Parents: 95c18de
Author: Sebastien Goasguen <ru...@gmail.com>
Authored: Thu Dec 4 07:06:59 2014 -0500
Committer: Sebastien Goasguen <ru...@gmail.com>
Committed: Thu Dec 4 07:06:59 2014 -0500

----------------------------------------------------------------------
 README.rst | 52 ++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 46 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2cec77cf/README.rst
----------------------------------------------------------------------
diff --git a/README.rst b/README.rst
index 710653c..146452e 100644
--- a/README.rst
+++ b/README.rst
@@ -2,7 +2,7 @@
 EC2STACK
 ========
 
-An EC2 Compatibility Interface For Apache Cloudstack
+An EC2 Compatibility Interface For Apache CloudStack
 ####################################################
 
 .. image:: https://badge.fury.io/py/ec2stack.png
@@ -15,15 +15,55 @@ An EC2 Compatibility Interface For Apache Cloudstack
 Description
 -----------
 
-Apache Cloudstack is open source software designed to deploy and manage large networks of virtual machines, as highly available, highly scalable Infrastructure as a Service(laaS) cloud computing platform. Apache Cloudstack is used by a number of service providers to offer public cloud services, and by many companies to provide an on-premises (private) cloud offering.
+Apache CloudStack_ is an open source software designed to deploy and manage large networks of virtual machines, as highly available, highly scalable Infrastructure as a Service (IaaS) cloud computing platform.
 
-Users can manage their Apache Cloudstack cloud with an easy to use web interface, command line tools and/or a full featured RESTful API.
+ec2stack takes Amazon EC2 API requests, maps these requests to the appropriate CloudStack API calls and parses the responses as required. This allows utilities created for the Amazon EC2 API to be used against Apache CloudStack.
 
-Amazon web services(AWS) is a collection of “web services” that together make up Amazon’s cloud computing platform. The service is there to provide a large compute capacity much faster and cheaper than building a physical server farm. One of the most popular services offered is their elastic compute cloud service, better known as Amazon EC2. This service allows users to rent virtual machines in which they can run their own applications. Amazon’s EC2 service was one of the first cloud computing services brought out and as such the API Amazon exposed for the configuration and management of their virtual machines became a de facto standard for many cloud based utilities.
+Easy setup with Docker_
+-----------------------
 
-Bridging Apache Cloudstack with existing public cloud providers APIs is needed in order to help users work across clouds. Our project’s aim is to create an application that will sit above the Apache Cloudstack API. The application will take in common Amazon EC2 API requests, execute the necessary Cloudstack Calls and parse the responses as required. This would allow utilities created for the Amazon EC2 API to be used against Apache Cloudstack. This effectively gives users their own private Amazon EC2-like Infrastructure.
+The easiest way to run ec2stack is to use a docker container. Pull the image from docker hub.
+
+::
+
+    docker pull runseb/ec2stack
+
+Run an interactive container and configure ec2stack for your CloudStack endpoint.
+Be careful to use 0.0.0.0 as the address for ec2stack server.
+
+::
+
+    docker run -t -i ec2stack ec2stack-configure
+
+Commit the configured container into a new image specific to your cloud.
+
+::
+
+    docker commit <container id> ec2stack:yourcloud
+
+Run an container with the ec2stack command
+
+::
+
+    docker run -d -p 5000:5000 ec2stack:yourcloud ec2stack
+
+Register a user
+
+::
+
+    curl -d AWSSecretKey=yoursecretkey -d AWSAccessKeyId=yourapikey -d Action=RegisterSecretKey http://localhost:5000
+
+You now just need to configure your aws cli and use the local ec2stack point:
+
+::
+
+    aws ec2 describe-images --endpoint=http://localhost:5000
 
 Usage
 -----
 
-Please see the User Guide (https://github.com/BroganD1993/ec2stack/wiki/User-Guide)
+Please see the User Guide_.
+
+.. _Guide: https://github.com/BroganD1993/ec2stack/wiki/User-Guide
+.. _CloudStack: http://cloudstack.apache.org
+.. _Docker: http://www.docker.com
\ No newline at end of file


[14/50] cloudstack-ec2stack git commit: Merge branch 'master' of github.com:BroganD1993/ec2stack

Posted by se...@apache.org.
Merge branch 'master' of github.com:BroganD1993/ec2stack


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/9a837a57
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/9a837a57
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/9a837a57

Branch: refs/heads/master
Commit: 9a837a57f163d913c0e5cada4a01fab61b2bb358
Parents: 343f327 2acc057
Author: BroganD1993 <da...@hotmail.com>
Authored: Sun Jul 20 14:19:23 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Sun Jul 20 14:19:23 2014 +0100

----------------------------------------------------------------------
 README.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[22/50] cloudstack-ec2stack git commit: Finish basic snapshot support

Posted by se...@apache.org.
Finish basic snapshot support


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/b30b27e8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/b30b27e8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/b30b27e8

Branch: refs/heads/master
Commit: b30b27e8f68a939f4b3e8e8a49c786f6819f2af1
Parents: b6a48b9
Author: brogand1993 <da...@hotmail.com>
Authored: Sat Aug 9 13:37:30 2014 +0100
Committer: brogand1993 <da...@hotmail.com>
Committed: Sat Aug 9 13:37:30 2014 +0100

----------------------------------------------------------------------
 ec2stack/providers/cloudstack/snapshots.py       | 19 +++++++++++++------
 ec2stack/templates/snapshots.xml                 |  2 +-
 ...invalid_create_snapshot_volume_not_found.json |  8 ++++++++
 tests/data/invalid_create_tag_invalid_id.json    | 17 -----------------
 tests/data/invalid_create_tag_not_found.json     | 17 +++++++++++++++++
 ...valid_delete_snapshot_snapshot_not_found.json |  8 ++++++++
 .../data/invalid_delete_tag_invalid_tag_id.json  | 17 -----------------
 tests/data/invalid_delete_tag_tag_not_found.json | 17 +++++++++++++++++
 .../invalid_describe_image_image_not_found.json  |  8 ++++++++
 .../invalid_describe_image_invalid_image_id.json |  8 --------
 ...valid_describe_volume_instance_not_found.json |  3 +++
 ...alid_describe_volume_invalid_instance_id.json |  3 ---
 tests/tags_tests.py                              |  4 ++--
 13 files changed, 77 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/ec2stack/providers/cloudstack/snapshots.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/snapshots.py b/ec2stack/providers/cloudstack/snapshots.py
index 69e53ea..8f3dc2d 100644
--- a/ec2stack/providers/cloudstack/snapshots.py
+++ b/ec2stack/providers/cloudstack/snapshots.py
@@ -17,6 +17,7 @@ def create_snapshot():
 
     @return: Response.
     """
+    helpers.require_parameters(['VolumeId'])
     response = _create_snapshot_request()
     return _create_snapshot_response(response)
 
@@ -27,7 +28,7 @@ def _create_snapshot_request():
 
     @return: Response.
     """
-    args = {'command': 'createSnapshot'}
+    args = {'command': 'createSnapshot', 'volumeid': helpers.get('VolumeId')}
 
     response = requester.make_request_async(args)
 
@@ -41,8 +42,11 @@ def _create_snapshot_response(response):
     @param response: Response from Cloudstack.
     @return: Response.
     """
-
-    response = response['vmsnapshot']
+    if 'errortext' in response:
+        if 'Invalid parameter volumeid' in response['errortext']:
+            errors.invalid_volume_id()
+    else:
+        response = response['snapshot']
     return {
         'template_name_or_list': 'create_snapshot.xml',
         'response_type': 'CreateSnapshotResponse',
@@ -58,8 +62,8 @@ def delete_snapshot():
     @return: Response.
     """
     helpers.require_parameters(['SnapshotId'])
-    _delete_snapshot_request()
-    return _delete_snapshot_response()
+    response = _delete_snapshot_request()
+    return _delete_snapshot_response(response)
 
 
 def _delete_snapshot_request():
@@ -75,12 +79,15 @@ def _delete_snapshot_request():
     return response
 
 
-def _delete_snapshot_response():
+def _delete_snapshot_response(response):
     """
     Generates a response for delete snapshot request.
 
     @return: Response.
     """
+    if 'errortext' in response:
+        if 'Invalid parameter id' in response['errortext']:
+            errors.invalid_snapshot_id()
     return {
         'template_name_or_list': 'status.xml',
         'response_type': 'DeleteSnapshotResponse',

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/ec2stack/templates/snapshots.xml
----------------------------------------------------------------------
diff --git a/ec2stack/templates/snapshots.xml b/ec2stack/templates/snapshots.xml
index 1560683..d4a3cee 100644
--- a/ec2stack/templates/snapshots.xml
+++ b/ec2stack/templates/snapshots.xml
@@ -1,7 +1,7 @@
 {% extends "response.xml" %}
 {% block response_content %}
     <snapshotSet>
-        {% for snapshot in response.vmsnapshot %}
+        {% for snapshot in response.snapshot %}
         <item>
             <snapshotId>{{ snapshot.id }}</snapshotId>
             <volumeId>{{ snapshot.volumeid }}</volumeId>

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/data/invalid_create_snapshot_volume_not_found.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_create_snapshot_volume_not_found.json b/tests/data/invalid_create_snapshot_volume_not_found.json
new file mode 100644
index 0000000..51440fd
--- /dev/null
+++ b/tests/data/invalid_create_snapshot_volume_not_found.json
@@ -0,0 +1,8 @@
+{
+    "createsnapshotresponse": {
+        "errorcode": 431,
+        "uuidlist": [],
+        "cserrorcode": 9999,
+        "errortext": "Unable to execute API command createsnapshot due to invalid value. Invalid parameter volumeid value=120a5425-6092-4700-baaf-600fcbaa10 due to incorrect long value format, or entity does not exist or due to incorrect parameter annotation for the field in api cmd class."
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/data/invalid_create_tag_invalid_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_create_tag_invalid_id.json b/tests/data/invalid_create_tag_invalid_id.json
deleted file mode 100644
index d0defb5..0000000
--- a/tests/data/invalid_create_tag_invalid_id.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "queryasyncjobresultresponse": {
-        "jobprocstatus": 0,
-        "created": "2014-06-01T13:43:16+0200",
-        "cmd": "org.apache.cloudstack.api.command.user.tag.CreateTagsCmd",
-        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
-        "jobstatus": 2,
-        "jobid": "3cca108f-53df-4a57-8975-3caf29e9d313",
-        "jobresultcode": 530,
-        "jobresulttype": "object",
-        "jobresult": {
-            "errorcode": 530,
-            "errortext": "Unable to find resource by id a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d and type UserVm"
-        },
-        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/data/invalid_create_tag_not_found.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_create_tag_not_found.json b/tests/data/invalid_create_tag_not_found.json
new file mode 100644
index 0000000..d0defb5
--- /dev/null
+++ b/tests/data/invalid_create_tag_not_found.json
@@ -0,0 +1,17 @@
+{
+    "queryasyncjobresultresponse": {
+        "jobprocstatus": 0,
+        "created": "2014-06-01T13:43:16+0200",
+        "cmd": "org.apache.cloudstack.api.command.user.tag.CreateTagsCmd",
+        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
+        "jobstatus": 2,
+        "jobid": "3cca108f-53df-4a57-8975-3caf29e9d313",
+        "jobresultcode": 530,
+        "jobresulttype": "object",
+        "jobresult": {
+            "errorcode": 530,
+            "errortext": "Unable to find resource by id a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d and type UserVm"
+        },
+        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/data/invalid_delete_snapshot_snapshot_not_found.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_delete_snapshot_snapshot_not_found.json b/tests/data/invalid_delete_snapshot_snapshot_not_found.json
new file mode 100644
index 0000000..04ac9cf
--- /dev/null
+++ b/tests/data/invalid_delete_snapshot_snapshot_not_found.json
@@ -0,0 +1,8 @@
+{
+    "deletesnapshotresponse": {
+        "errorcode": 431,
+        "uuidlist": [],
+        "cserrorcode": 9999,
+        "errortext": "Unable to execute API command deletesnapshot due to invalid value. Invalid parameter id value=abdb81fa-f4ac-4ec6-822c-34af7cd461 due to incorrect long value format, or entity does not exist or due to incorrect parameter annotation for the field in api cmd class."
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/data/invalid_delete_tag_invalid_tag_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_delete_tag_invalid_tag_id.json b/tests/data/invalid_delete_tag_invalid_tag_id.json
deleted file mode 100644
index ba015af..0000000
--- a/tests/data/invalid_delete_tag_invalid_tag_id.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "queryasyncjobresultresponse": {
-        "jobprocstatus": 0,
-        "created": "2014-06-01T13:43:16+0200",
-        "cmd": "org.apache.cloudstack.api.command.user.tag.DeleteTagsCmd",
-        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
-        "jobstatus": 2,
-        "jobid": "3cca108f-53df-4a57-8975-3caf29e9d313",
-        "jobresultcode": 530,
-        "jobresulttype": "object",
-        "jobresult": {
-            "errorcode": 530,
-            "errortext": "Unable to find resource by id a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d and type UserVm"
-        },
-        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/data/invalid_delete_tag_tag_not_found.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_delete_tag_tag_not_found.json b/tests/data/invalid_delete_tag_tag_not_found.json
new file mode 100644
index 0000000..ba015af
--- /dev/null
+++ b/tests/data/invalid_delete_tag_tag_not_found.json
@@ -0,0 +1,17 @@
+{
+    "queryasyncjobresultresponse": {
+        "jobprocstatus": 0,
+        "created": "2014-06-01T13:43:16+0200",
+        "cmd": "org.apache.cloudstack.api.command.user.tag.DeleteTagsCmd",
+        "userid": "26a772da-dc25-4f2b-b0f1-e095e3717a30",
+        "jobstatus": 2,
+        "jobid": "3cca108f-53df-4a57-8975-3caf29e9d313",
+        "jobresultcode": 530,
+        "jobresulttype": "object",
+        "jobresult": {
+            "errorcode": 530,
+            "errortext": "Unable to find resource by id a0ae3a53-1f4d-42d3-bbb8-7227bb0e0d and type UserVm"
+        },
+        "accountid": "ddbdf378-e8d9-47e0-964b-661d0d8414b8"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/data/invalid_describe_image_image_not_found.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_describe_image_image_not_found.json b/tests/data/invalid_describe_image_image_not_found.json
new file mode 100644
index 0000000..0ca8f90
--- /dev/null
+++ b/tests/data/invalid_describe_image_image_not_found.json
@@ -0,0 +1,8 @@
+{
+    "listtemplatesresponse": {
+        "errorcode": 431,
+        "uuidlist": [],
+        "cserrorcode": 4350,
+        "errortext": "Please specify a valid template ID."
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/data/invalid_describe_image_invalid_image_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_describe_image_invalid_image_id.json b/tests/data/invalid_describe_image_invalid_image_id.json
deleted file mode 100644
index 0ca8f90..0000000
--- a/tests/data/invalid_describe_image_invalid_image_id.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "listtemplatesresponse": {
-        "errorcode": 431,
-        "uuidlist": [],
-        "cserrorcode": 4350,
-        "errortext": "Please specify a valid template ID."
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/data/invalid_describe_volume_instance_not_found.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_describe_volume_instance_not_found.json b/tests/data/invalid_describe_volume_instance_not_found.json
new file mode 100644
index 0000000..11f93dc
--- /dev/null
+++ b/tests/data/invalid_describe_volume_instance_not_found.json
@@ -0,0 +1,3 @@
+{
+    "listvirtualmachinesresponse": {}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/data/invalid_describe_volume_invalid_instance_id.json
----------------------------------------------------------------------
diff --git a/tests/data/invalid_describe_volume_invalid_instance_id.json b/tests/data/invalid_describe_volume_invalid_instance_id.json
deleted file mode 100644
index 11f93dc..0000000
--- a/tests/data/invalid_describe_volume_invalid_instance_id.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-    "listvirtualmachinesresponse": {}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b30b27e8/tests/tags_tests.py
----------------------------------------------------------------------
diff --git a/tests/tags_tests.py b/tests/tags_tests.py
index 6dc1958..e8e57cc 100644
--- a/tests/tags_tests.py
+++ b/tests/tags_tests.py
@@ -73,7 +73,7 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/invalid_create_tag_invalid_id.json'
+            'tests/data/invalid_create_tag_not_found.json'
         )
         get.return_value.status_code = 200
 
@@ -145,7 +145,7 @@ class TagsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/invalid_delete_tag_invalid_tag_id.json'
+            'tests/data/invalid_delete_tag_tag_not_found.json'
         )
         get.return_value.status_code = 200
 


[34/50] cloudstack-ec2stack git commit: Bump version

Posted by se...@apache.org.
Bump version


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/1f4db269
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/1f4db269
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/1f4db269

Branch: refs/heads/master
Commit: 1f4db269bcdde838cade57736da696f92d320370
Parents: 3d419b8
Author: BroganD1993 <da...@hotmail.com>
Authored: Wed Aug 20 20:08:54 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Wed Aug 20 20:08:54 2014 +0100

----------------------------------------------------------------------
 HISTORY.rst | 5 +++++
 setup.py    | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/1f4db269/HISTORY.rst
----------------------------------------------------------------------
diff --git a/HISTORY.rst b/HISTORY.rst
index 40a00e3..1114b03 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,11 @@
 History
 =======
 
+0.7.1 (20-08-2014)
+__________________
+
+* Add support for gp2 ec2 instances
+
 0.7.0 (11-08-2014)
 __________________
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/1f4db269/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 1da74dc..7fecfa3 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ def read_file(name):
 
 
 PROJECT = 'ec2stack'
-VERSION = '0.7'
+VERSION = '0.7.1'
 URL = 'http://github.com/imduffy15/ec2stack'
 AUTHOR = 'Darren Brogan, Ian Duffy'
 AUTHOR_EMAIL = 'brogand2@mail.dcu.ie, duffyi3@mail.dcu.ie'


[30/50] cloudstack-ec2stack git commit: Revert volumes.py

Posted by se...@apache.org.
Revert volumes.py


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/ad3b688d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/ad3b688d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/ad3b688d

Branch: refs/heads/master
Commit: ad3b688d03eb7ac1314c129a06320a218e6d0a9b
Parents: 36ba44f
Author: BroganD1993 <da...@hotmail.com>
Authored: Sat Aug 16 10:26:41 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Sat Aug 16 10:26:41 2014 +0100

----------------------------------------------------------------------
 ec2stack/providers/cloudstack/volumes.py | 29 ++++++++-------------------
 1 file changed, 8 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ad3b688d/ec2stack/providers/cloudstack/volumes.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/volumes.py b/ec2stack/providers/cloudstack/volumes.py
index c89ed26..8b0cb4e 100644
--- a/ec2stack/providers/cloudstack/volumes.py
+++ b/ec2stack/providers/cloudstack/volumes.py
@@ -92,39 +92,26 @@ def _create_volume_request():
     """
     args = {}
 
-    zone_name = helpers.get('AvailabilityZone')
-    zone_id = zones.get_zone(zone_name)['id']
-
-    args['zoneid'] = zone_id
-
     if helpers.contains_parameter('SnapshotId'):
         args['snapshotid'] = helpers.get('SnapshotId')
-        args['name'] = uuid.uuid1()
-        args['command'] = 'createVolume'
-        response = requester.make_request_async(args)
 
     else:
         helpers.require_parameters(['Size'])
-        size = helpers.get('Size')
-        disk_id = disk_offerings.get_disk_offering(
+        args['size'] = helpers.get('Size')
+        args['diskofferingid'] = disk_offerings.get_disk_offering(
             current_app.config['CLOUDSTACK_CUSTOM_DISK_OFFERING']
         )['id']
-        response = create_cloudstack_volume_from_disk(disk_id, size, args)
-
-    return response
 
-def create_cloudstack_volume_from_disk(disk_id, size, args):
-    """
-    Create a volume from disk offering.
+    zone_name = helpers.get('AvailabilityZone')
+    zone_id = zones.get_zone(zone_name)['id']
 
-    @return: Response.
-    """
+    args['zoneid'] = zone_id
     args['command'] = 'createVolume'
-    args['diskofferingid'] = disk_id
     args['name'] = uuid.uuid1()
-    args['size'] = size
 
-    return requester.make_request_async(args)
+    response = requester.make_request_async(args)
+
+    return response
 
 
 def _create_volume_response(response):


[50/50] cloudstack-ec2stack git commit: bump version

Posted by se...@apache.org.
bump version


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/21d8b4b1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/21d8b4b1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/21d8b4b1

Branch: refs/heads/master
Commit: 21d8b4b1d6ca8c356e07c8103c72b6b20419ec0d
Parents: 7b7e8ee
Author: Ian Duffy <ia...@ianduffy.ie>
Authored: Wed Apr 15 06:48:37 2015 +0100
Committer: Ian Duffy <ia...@ianduffy.ie>
Committed: Wed Apr 15 06:48:37 2015 +0100

----------------------------------------------------------------------
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/21d8b4b1/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 79741b9..f1cc10f 100644
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,7 @@ def read_file(name):
 
 
 PROJECT = 'ec2stack'
-VERSION = '0.7.1'
+VERSION = '0.7.2'
 URL = 'http://github.com/BroganD1993/ec2stack'
 AUTHOR = 'Darren Brogan, Ian Duffy'
 AUTHOR_EMAIL = 'brogand2@mail.dcu.ie, duffyi3@mail.dcu.ie'


[12/50] cloudstack-ec2stack git commit: Update README.rst

Posted by se...@apache.org.
Update README.rst

Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/2acc0570
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/2acc0570
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/2acc0570

Branch: refs/heads/master
Commit: 2acc0570a2c27df45d29e2702f5c12455f6d7ca9
Parents: 44fb5bd
Author: Darren <da...@hotmail.com>
Authored: Sat Jul 19 18:12:54 2014 +0100
Committer: Darren <da...@hotmail.com>
Committed: Sat Jul 19 18:12:54 2014 +0100

----------------------------------------------------------------------
 README.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/2acc0570/README.rst
----------------------------------------------------------------------
diff --git a/README.rst b/README.rst
index b433573..710653c 100644
--- a/README.rst
+++ b/README.rst
@@ -26,4 +26,4 @@ Bridging Apache Cloudstack with existing public cloud providers APIs is needed i
 Usage
 -----
 
-Please see the Software User Manual (https://github.com/brogand1993/ec2stack/wiki/Software-User-Manual)
+Please see the User Guide (https://github.com/BroganD1993/ec2stack/wiki/User-Guide)


[28/50] cloudstack-ec2stack git commit: Add custom local disk to configuration options at config time

Posted by se...@apache.org.
Add custom local disk to configuration options at config time


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/a4965ff3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/a4965ff3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/a4965ff3

Branch: refs/heads/master
Commit: a4965ff343d94f6015ac27906a14fb18f0417f9c
Parents: 32b7884
Author: BroganD1993 <da...@hotmail.com>
Authored: Fri Aug 15 12:38:53 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Fri Aug 15 12:38:53 2014 +0100

----------------------------------------------------------------------
 ec2stack/configure.py | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/a4965ff3/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index cc2e6f6..25e79d6 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -168,6 +168,16 @@ def _set_optional_attributes_of_profile(config, profile):
     @param profile: the profile to set the attribute in.
     @return: configparser configuration.
     """
+
+    configure_instance_type_mapings = raw_input(
+        'Do you wish to input a local custom storage disk? (Yes/No): '
+    )
+
+    if configure_instance_type_mapings.lower() in ['yes', 'y']:
+        config = _set_attribute_of_profile(
+            config, profile, 'cloudstack_local_custom_disk_offering', 'Cloudstack custom local disk offering name', 'CustomLocal'
+        )
+
     configure_instance_type_mapings = raw_input(
         'Do you wish to input instance type mappings? (Yes/No): '
     )


[05/50] cloudstack-ec2stack git commit: Add vpc templates

Posted by se...@apache.org.
Add vpc templates


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/bd274046
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/bd274046
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/bd274046

Branch: refs/heads/master
Commit: bd274046910b2901333711ff5396d61ae98340e2
Parents: 2260ea0
Author: BroganD1993 <da...@hotmail.com>
Authored: Tue Jul 15 20:20:17 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Tue Jul 15 20:20:17 2014 +0100

----------------------------------------------------------------------
 ec2stack/templates/create_vpc.xml |  9 +++++++++
 ec2stack/templates/vpcs.xml       | 13 +++++++++++++
 2 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/bd274046/ec2stack/templates/create_vpc.xml
----------------------------------------------------------------------
diff --git a/ec2stack/templates/create_vpc.xml b/ec2stack/templates/create_vpc.xml
new file mode 100644
index 0000000..99f8624
--- /dev/null
+++ b/ec2stack/templates/create_vpc.xml
@@ -0,0 +1,9 @@
+{% extends "response.xml" %}
+{% block response_content %}
+   <vpc>
+      <vpcId>{{ vpc.id }}</vpcId>
+      <state>{{ vpc.state}}</state>
+      <cidrBlock>{{ vpc.cidr }}</cidrBlock>
+      <tagSet/>
+   </vpc>
+{% endblock %}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/bd274046/ec2stack/templates/vpcs.xml
----------------------------------------------------------------------
diff --git a/ec2stack/templates/vpcs.xml b/ec2stack/templates/vpcs.xml
new file mode 100644
index 0000000..036e1bb
--- /dev/null
+++ b/ec2stack/templates/vpcs.xml
@@ -0,0 +1,13 @@
+{% extends "response.xml" %}
+{% block response_content %}
+    <vpcSet>
+        {% for vpc in response.vpc %}
+        <item>
+            <vpcId>{{ vpc.id }}</vpcId>
+            <state>{{ vpc.state}}</state>
+            <cidrBlock>{{ vpc.cidr }}</cidrBlock>
+            <tagSet/>
+        </item>
+        {% endfor %}
+    </vpcSet>
+{% endblock %}


[46/50] cloudstack-ec2stack git commit: Add the Apache license to all python files. Closes #65

Posted by se...@apache.org.
Add the Apache license to all python files. Closes #65


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/ee67d4d8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/ee67d4d8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/ee67d4d8

Branch: refs/heads/master
Commit: ee67d4d817d7f30bf48641c571b490b6ef14d791
Parents: c41f7d5
Author: Ian Duffy <ia...@ianduffy.ie>
Authored: Mon Apr 13 14:36:10 2015 +0100
Committer: Ian Duffy <ia...@ianduffy.ie>
Committed: Mon Apr 13 14:36:10 2015 +0100

----------------------------------------------------------------------
 ec2stack/__init__.py                            | 18 ++++++++++++++
 ec2stack/__main__.py                            | 18 ++++++++++++++
 ec2stack/configure.py                           | 18 ++++++++++++++
 ec2stack/controllers/__init__.py                | 18 ++++++++++++++
 ec2stack/controllers/default.py                 | 18 ++++++++++++++
 ec2stack/core.py                                | 18 ++++++++++++++
 ec2stack/errors.py                              | 18 ++++++++++++++
 ec2stack/helpers.py                             | 18 ++++++++++++++
 ec2stack/models/__init__.py                     | 18 ++++++++++++++
 ec2stack/models/users/__init__.py               | 18 ++++++++++++++
 ec2stack/models/users/models.py                 | 18 ++++++++++++++
 ec2stack/providers/__init__.py                  | 18 ++++++++++++++
 ec2stack/providers/cloudstack/__init__.py       | 18 ++++++++++++++
 ec2stack/providers/cloudstack/disk_offerings.py | 18 ++++++++++++++
 ec2stack/providers/cloudstack/images.py         | 18 ++++++++++++++
 ec2stack/providers/cloudstack/instances.py      | 18 ++++++++++++++
 ec2stack/providers/cloudstack/keypairs.py       | 18 ++++++++++++++
 ec2stack/providers/cloudstack/passwords.py      | 18 ++++++++++++++
 ec2stack/providers/cloudstack/requester.py      | 18 ++++++++++++++
 .../providers/cloudstack/security_groups.py     | 18 ++++++++++++++
 .../providers/cloudstack/service_offerings.py   | 18 ++++++++++++++
 ec2stack/providers/cloudstack/snapshots.py      | 18 ++++++++++++++
 ec2stack/providers/cloudstack/tags.py           | 18 ++++++++++++++
 ec2stack/providers/cloudstack/volumes.py        | 18 ++++++++++++++
 ec2stack/providers/cloudstack/vpcs.py           | 18 ++++++++++++++
 ec2stack/providers/cloudstack/zones.py          | 18 ++++++++++++++
 ec2stack/secretkey_manager.py                   | 18 ++++++++++++++
 ec2stack/services.py                            | 18 ++++++++++++++
 migrations/env.py                               | 21 ++++++++++++++++
 migrations/versions/1b1a5f6b42a_.py             | 21 ++++++++++++++++
 setup.py                                        | 18 ++++++++++++++
 tests/__init__.py                               | 18 ++++++++++++++
 tests/controller_tests.py                       | 18 ++++++++++++++
 tests/disk_offering_tests.py                    | 18 ++++++++++++++
 tests/factories.py                              | 18 ++++++++++++++
 tests/images_tests.py                           | 18 ++++++++++++++
 tests/instances_tests.py                        | 18 ++++++++++++++
 tests/keypair_tests.py                          | 18 ++++++++++++++
 tests/password_tests.py                         | 18 ++++++++++++++
 tests/security_group_tests.py                   | 18 ++++++++++++++
 tests/service_offering_tests.py                 | 18 ++++++++++++++
 tests/settings.py                               | 21 ++++++++++++++++
 tests/snapshot_tests.py                         | 18 ++++++++++++++
 tests/tags_tests.py                             | 18 ++++++++++++++
 tests/utils.py                                  | 25 ++++++++++++++------
 tests/volume_tests.py                           | 18 ++++++++++++++
 tests/vpc_tests.py                              | 19 ++++++++++++++-
 tests/zones_tests.py                            | 18 ++++++++++++++
 48 files changed, 873 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/__init__.py b/ec2stack/__init__.py
index bb61d03..7e04946 100644
--- a/ec2stack/__init__.py
+++ b/ec2stack/__init__.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module creates the flask application.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/__main__.py
----------------------------------------------------------------------
diff --git a/ec2stack/__main__.py b/ec2stack/__main__.py
index a2dbbe5..a1713e6 100644
--- a/ec2stack/__main__.py
+++ b/ec2stack/__main__.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module is used to launch EC2Stack.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index 22dd22a..d2737ab 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module provides functions to generate an ec2stack configuration file.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/controllers/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/controllers/__init__.py b/ec2stack/controllers/__init__.py
index 87cbeaf..433ff99 100644
--- a/ec2stack/controllers/__init__.py
+++ b/ec2stack/controllers/__init__.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains route handlers for the application.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/controllers/default.py
----------------------------------------------------------------------
diff --git a/ec2stack/controllers/default.py b/ec2stack/controllers/default.py
index 4371c96..fcea349 100644
--- a/ec2stack/controllers/default.py
+++ b/ec2stack/controllers/default.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 flask import Blueprint
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/core.py
----------------------------------------------------------------------
diff --git a/ec2stack/core.py b/ec2stack/core.py
index 37ee635..1bdcc7d 100644
--- a/ec2stack/core.py
+++ b/ec2stack/core.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module provides core classes.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/errors.py
----------------------------------------------------------------------
diff --git a/ec2stack/errors.py b/ec2stack/errors.py
index 1e50ea0..489e95e 100644
--- a/ec2stack/errors.py
+++ b/ec2stack/errors.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for error reporting.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/helpers.py
----------------------------------------------------------------------
diff --git a/ec2stack/helpers.py b/ec2stack/helpers.py
index 57dc655..61c0afe 100644
--- a/ec2stack/helpers.py
+++ b/ec2stack/helpers.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains helper functions used across the package namespace.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/models/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/models/__init__.py b/ec2stack/models/__init__.py
index 433e1ef..4e7a34b 100644
--- a/ec2stack/models/__init__.py
+++ b/ec2stack/models/__init__.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module exposes all models.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/models/users/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/models/users/__init__.py b/ec2stack/models/users/__init__.py
index ae8fba9..4d1b372 100644
--- a/ec2stack/models/users/__init__.py
+++ b/ec2stack/models/users/__init__.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module creates a user service.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/models/users/models.py
----------------------------------------------------------------------
diff --git a/ec2stack/models/users/models.py b/ec2stack/models/users/models.py
index b0f712a..f3f1458 100644
--- a/ec2stack/models/users/models.py
+++ b/ec2stack/models/users/models.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module creates the user model.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/__init__.py b/ec2stack/providers/__init__.py
index c67da43..434f3bf 100644
--- a/ec2stack/providers/__init__.py
+++ b/ec2stack/providers/__init__.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains providers for request execution.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/__init__.py b/ec2stack/providers/cloudstack/__init__.py
index 138633a..357a27c 100644
--- a/ec2stack/providers/cloudstack/__init__.py
+++ b/ec2stack/providers/cloudstack/__init__.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains helper functions used across the package namespace.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/disk_offerings.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/disk_offerings.py b/ec2stack/providers/cloudstack/disk_offerings.py
index 2dee38a..483d38d 100644
--- a/ec2stack/providers/cloudstack/disk_offerings.py
+++ b/ec2stack/providers/cloudstack/disk_offerings.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to disk
 offerings.

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/images.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/images.py b/ec2stack/providers/cloudstack/images.py
index 05a9cd3..109a082 100644
--- a/ec2stack/providers/cloudstack/images.py
+++ b/ec2stack/providers/cloudstack/images.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to images.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/instances.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/instances.py b/ec2stack/providers/cloudstack/instances.py
index 7ed22ab..442834e 100644
--- a/ec2stack/providers/cloudstack/instances.py
+++ b/ec2stack/providers/cloudstack/instances.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to
 instances.

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/keypairs.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/keypairs.py b/ec2stack/providers/cloudstack/keypairs.py
index 2a9ff7e..1b24b29 100644
--- a/ec2stack/providers/cloudstack/keypairs.py
+++ b/ec2stack/providers/cloudstack/keypairs.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to keypairs.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/passwords.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/passwords.py b/ec2stack/providers/cloudstack/passwords.py
index 614b981..448ff83 100644
--- a/ec2stack/providers/cloudstack/passwords.py
+++ b/ec2stack/providers/cloudstack/passwords.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to password
 data.

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/requester.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/requester.py b/ec2stack/providers/cloudstack/requester.py
index 401a617..b53b097 100644
--- a/ec2stack/providers/cloudstack/requester.py
+++ b/ec2stack/providers/cloudstack/requester.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling the execution of requests
 against Cloudstack.

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/security_groups.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/security_groups.py b/ec2stack/providers/cloudstack/security_groups.py
index a9de4c5..ee3768c 100644
--- a/ec2stack/providers/cloudstack/security_groups.py
+++ b/ec2stack/providers/cloudstack/security_groups.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to security
 groups

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/service_offerings.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/service_offerings.py b/ec2stack/providers/cloudstack/service_offerings.py
index 93eba01..2f459b3 100644
--- a/ec2stack/providers/cloudstack/service_offerings.py
+++ b/ec2stack/providers/cloudstack/service_offerings.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to service
 offerings.

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/snapshots.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/snapshots.py b/ec2stack/providers/cloudstack/snapshots.py
index 6542d84..cfaddd9 100644
--- a/ec2stack/providers/cloudstack/snapshots.py
+++ b/ec2stack/providers/cloudstack/snapshots.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to snapshots.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/tags.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/tags.py b/ec2stack/providers/cloudstack/tags.py
index 40a1100..68b35e7 100644
--- a/ec2stack/providers/cloudstack/tags.py
+++ b/ec2stack/providers/cloudstack/tags.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to tags.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/volumes.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/volumes.py b/ec2stack/providers/cloudstack/volumes.py
index 8b0cb4e..a677c37 100644
--- a/ec2stack/providers/cloudstack/volumes.py
+++ b/ec2stack/providers/cloudstack/volumes.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to volumes
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/vpcs.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/vpcs.py b/ec2stack/providers/cloudstack/vpcs.py
index 9591d54..959fe5f 100644
--- a/ec2stack/providers/cloudstack/vpcs.py
+++ b/ec2stack/providers/cloudstack/vpcs.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to vpcs.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/providers/cloudstack/zones.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/zones.py b/ec2stack/providers/cloudstack/zones.py
index 1dbbb91..0a80b32 100644
--- a/ec2stack/providers/cloudstack/zones.py
+++ b/ec2stack/providers/cloudstack/zones.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module contains functions for handling requests in relation to zones.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/secretkey_manager.py
----------------------------------------------------------------------
diff --git a/ec2stack/secretkey_manager.py b/ec2stack/secretkey_manager.py
index 2c6b9b6..ae55744 100644
--- a/ec2stack/secretkey_manager.py
+++ b/ec2stack/secretkey_manager.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module provides functions to register AWSAccessKeyIds and AWSSecretKeys.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/ec2stack/services.py
----------------------------------------------------------------------
diff --git a/ec2stack/services.py b/ec2stack/services.py
index 2761cc8..927c3a9 100644
--- a/ec2stack/services.py
+++ b/ec2stack/services.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 module creates services for all models.
 """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/migrations/env.py
----------------------------------------------------------------------
diff --git a/migrations/env.py b/migrations/env.py
index 27e96d1..d3875bd 100644
--- a/migrations/env.py
+++ b/migrations/env.py
@@ -1,3 +1,24 @@
+#!/usr/bin/env python
+# encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 __future__ import with_statement
 from alembic import context
 from sqlalchemy import engine_from_config, pool

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/migrations/versions/1b1a5f6b42a_.py
----------------------------------------------------------------------
diff --git a/migrations/versions/1b1a5f6b42a_.py b/migrations/versions/1b1a5f6b42a_.py
index d547d63..adf42d6 100644
--- a/migrations/versions/1b1a5f6b42a_.py
+++ b/migrations/versions/1b1a5f6b42a_.py
@@ -1,3 +1,24 @@
+#!/usr/bin/env python
+# encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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.
+#
+
 """empty message
 
 Revision ID: 1b1a5f6b42a

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index b1d7e66..274ceb9 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/__init__.py
----------------------------------------------------------------------
diff --git a/tests/__init__.py b/tests/__init__.py
index 85bc946..4965f77 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 unittest import TestCase
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/controller_tests.py
----------------------------------------------------------------------
diff --git a/tests/controller_tests.py b/tests/controller_tests.py
index 79be584..8ffc733 100644
--- a/tests/controller_tests.py
+++ b/tests/controller_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/disk_offering_tests.py
----------------------------------------------------------------------
diff --git a/tests/disk_offering_tests.py b/tests/disk_offering_tests.py
index 3c077ec..05bc3db 100644
--- a/tests/disk_offering_tests.py
+++ b/tests/disk_offering_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/factories.py
----------------------------------------------------------------------
diff --git a/tests/factories.py b/tests/factories.py
index e67fa08..25fda8d 100644
--- a/tests/factories.py
+++ b/tests/factories.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 factory import Factory
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/images_tests.py
----------------------------------------------------------------------
diff --git a/tests/images_tests.py b/tests/images_tests.py
index 58f3b0f..dc1e84a 100644
--- a/tests/images_tests.py
+++ b/tests/images_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/instances_tests.py
----------------------------------------------------------------------
diff --git a/tests/instances_tests.py b/tests/instances_tests.py
index a53fa0b..8cfa4f4 100644
--- a/tests/instances_tests.py
+++ b/tests/instances_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/keypair_tests.py
----------------------------------------------------------------------
diff --git a/tests/keypair_tests.py b/tests/keypair_tests.py
index 2e6732a..42f8515 100644
--- a/tests/keypair_tests.py
+++ b/tests/keypair_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 base64 import b64encode
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/password_tests.py
----------------------------------------------------------------------
diff --git a/tests/password_tests.py b/tests/password_tests.py
index 5c5410d..1b9de6f 100644
--- a/tests/password_tests.py
+++ b/tests/password_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/security_group_tests.py
----------------------------------------------------------------------
diff --git a/tests/security_group_tests.py b/tests/security_group_tests.py
index 57c07b1..6808ffc 100644
--- a/tests/security_group_tests.py
+++ b/tests/security_group_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/service_offering_tests.py
----------------------------------------------------------------------
diff --git a/tests/service_offering_tests.py b/tests/service_offering_tests.py
index 4e4851b..d13f859 100644
--- a/tests/service_offering_tests.py
+++ b/tests/service_offering_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/settings.py
----------------------------------------------------------------------
diff --git a/tests/settings.py b/tests/settings.py
index c96d52b..34fafad 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -1,3 +1,24 @@
+#!/usr/bin/env python
+# encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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.
+#
+
 EC2STACK_BIND_ADDRESS = '0.0.0.0'
 EC2STACK_PORT = '5000'
 CLOUDSTACK_HOST = 'api.exoscale.ch'

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/snapshot_tests.py
----------------------------------------------------------------------
diff --git a/tests/snapshot_tests.py b/tests/snapshot_tests.py
index cfea1dc..c0d95fb 100644
--- a/tests/snapshot_tests.py
+++ b/tests/snapshot_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 base64 import b64encode
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/tags_tests.py
----------------------------------------------------------------------
diff --git a/tests/tags_tests.py b/tests/tags_tests.py
index e8e57cc..d769312 100644
--- a/tests/tags_tests.py
+++ b/tests/tags_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 base64 import b64encode
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/utils.py
----------------------------------------------------------------------
diff --git a/tests/utils.py b/tests/utils.py
index a247fd8..0def948 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -1,12 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
-"""
-    tests.utils
-    ~~~~~~~~~~~
-
-    test utilities
-"""
-
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 FlaskTestCaseMixin(object):
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/volume_tests.py
----------------------------------------------------------------------
diff --git a/tests/volume_tests.py b/tests/volume_tests.py
index ad593a2..63bceaf 100644
--- a/tests/volume_tests.py
+++ b/tests/volume_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/vpc_tests.py
----------------------------------------------------------------------
diff --git a/tests/vpc_tests.py b/tests/vpc_tests.py
index b8df263..c238bc1 100644
--- a/tests/vpc_tests.py
+++ b/tests/vpc_tests.py
@@ -1,6 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
-
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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 base64 import b64encode
 
 import mock

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/ee67d4d8/tests/zones_tests.py
----------------------------------------------------------------------
diff --git a/tests/zones_tests.py b/tests/zones_tests.py
index 13f3331..d562271 100644
--- a/tests/zones_tests.py
+++ b/tests/zones_tests.py
@@ -1,5 +1,23 @@
 #!/usr/bin/env python
 # encoding: utf-8
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you 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
 


[45/50] cloudstack-ec2stack git commit: Merge pull request #64 from imduffy15/enhancement-#62

Posted by se...@apache.org.
Merge pull request #64 from imduffy15/enhancement-#62

Ticket is focused around bringing up ec2stack without having to use the interactive command prompt supplied by ec2stack-configure.

The proposed fix removes the requirement to use ec2stack-configure, if a config file exists it will use it. If no database exists it will just create it.

The docker piece separate.... we can open future tickets should a user have issues with it.

Going to merge and close.

Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/c41f7d58
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/c41f7d58
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/c41f7d58

Branch: refs/heads/master
Commit: c41f7d5837a46e26d27441be98f240b859235ec2
Parents: 4d30d0e c4d1a67
Author: Ian Duffy <ia...@ianduffy.ie>
Authored: Fri Dec 5 17:17:32 2014 +0000
Committer: Ian Duffy <ia...@ianduffy.ie>
Committed: Fri Dec 5 17:17:32 2014 +0000

----------------------------------------------------------------------
 .deploy-coverage.sh    | 13 -------------
 .travis.yml            |  4 ----
 ec2stack/__init__.py   | 11 ++++++++++-
 ec2stack/configure.py  | 16 ----------------
 migrations/alembic.ini |  6 +++---
 5 files changed, 13 insertions(+), 37 deletions(-)
----------------------------------------------------------------------



[07/50] cloudstack-ec2stack git commit: Complete create/list/delete vpc actions.

Posted by se...@apache.org.
Complete create/list/delete vpc actions.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/174c7981
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/174c7981
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/174c7981

Branch: refs/heads/master
Commit: 174c7981a552c0206794de862613eaca4521af73
Parents: 9515095
Author: BroganD1993 <da...@hotmail.com>
Authored: Thu Jul 17 19:54:26 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Thu Jul 17 19:54:26 2014 +0100

----------------------------------------------------------------------
 ec2stack/controllers/default.py       |  2 ++
 ec2stack/errors.py                    | 12 ++++++++++++
 ec2stack/providers/cloudstack/vpcs.py | 16 ++++++++++------
 ec2stack/templates/create_vpc.xml     |  6 +++---
 4 files changed, 27 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/174c7981/ec2stack/controllers/default.py
----------------------------------------------------------------------
diff --git a/ec2stack/controllers/default.py b/ec2stack/controllers/default.py
index 14503d8..d0b05bd 100644
--- a/ec2stack/controllers/default.py
+++ b/ec2stack/controllers/default.py
@@ -52,6 +52,7 @@ def _get_action(action):
         'DeleteSecurityGroup': security_groups.delete_security_group,
         'DeleteTags': tags.delete_tags,
         'DeleteVolume': volumes.delete_volume,
+        'DeleteVpc': vpcs.delete_vpc,
         'DescribeAvailabilityZones': zones.describe_zones,
         'DescribeImageAttribute': images.describe_image_attribute,
         'DescribeImages': images.describe_images,
@@ -61,6 +62,7 @@ def _get_action(action):
         'DescribeSecurityGroups': security_groups.describe_security_groups,
         'DescribeTags': tags.describe_tags,
         'DescribeVolumes': volumes.describe_volumes,
+        'DescribeVpcs': vpcs.describe_vpcs,
         'DetachVolume': volumes.detach_volume,
         'GetPasswordData': passwords.get_password_data,
         'ImportKeyPair': keypairs.import_keypair,

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/174c7981/ec2stack/errors.py
----------------------------------------------------------------------
diff --git a/ec2stack/errors.py b/ec2stack/errors.py
index e7841eb..ba170bf 100644
--- a/ec2stack/errors.py
+++ b/ec2stack/errors.py
@@ -174,6 +174,18 @@ def invalid_vpc_range():
         'The specified CIDR block range is not valid.'
     )
 
+def invalid_vpc_id():
+    """
+    VPC with this ID does not exist.
+
+    @raise Ec2stackError: Defining a bad request and message.
+    """
+    raise Ec2stackError(
+        '400',
+        'InvalidVpcID.NotFound',
+        'The specified VPC does not exist.'
+    )
+
 
 def duplicate_security_group():
     """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/174c7981/ec2stack/providers/cloudstack/vpcs.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/vpcs.py b/ec2stack/providers/cloudstack/vpcs.py
index 5f877e2..56b2e40 100644
--- a/ec2stack/providers/cloudstack/vpcs.py
+++ b/ec2stack/providers/cloudstack/vpcs.py
@@ -7,10 +7,12 @@
 
 import uuid
 
+from flask import current_app
+
 from ec2stack import errors
 from ec2stack import helpers
 from ec2stack.providers import cloudstack
-from ec2stack.providers.cloudstack import requester
+from ec2stack.providers.cloudstack import requester, zones
 
 
 @helpers.authentication_required
@@ -35,11 +37,12 @@ def _create_vpc_request():
     args['name'] = id
     args['id'] = id
     args['displaytext'] = id
+    args['zoneid'] = zones.get_zone(
+        current_app.config['CLOUDSTACK_DEFAULT_ZONE'])['id']
+    args['vpcofferingid'] = current_app.config['VPC_OFFERING_ID']
     args['cidr'] = helpers.get('CidrBlock')
 
-    response = requester.make_request(args)
-
-    response = response['createvpcresponse']
+    response = requester.make_request_async(args)
 
     return response
 
@@ -61,6 +64,7 @@ def _create_vpc_response(response):
             'response': response
         }
 
+
 @helpers.authentication_required
 def delete_vpc():
     """
@@ -81,7 +85,7 @@ def _delete_vpc_request():
     """
     args = {'command': 'deleteVPC', 'id': helpers.get('VpcId')}
 
-    response = requester.make_request(args)
+    response = requester.make_request_async(args)
 
     return response
 
@@ -107,7 +111,7 @@ def describe_vpcs():
     """
     args = {'command': 'listVPCs'}
     response = cloudstack.describe_item(
-        args, 'vpc', {}, 'vpcId'
+        args, 'vpc', errors.invalid_vpc_id, 'VpcId'
     )
 
     return _describe_vpc_response(

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/174c7981/ec2stack/templates/create_vpc.xml
----------------------------------------------------------------------
diff --git a/ec2stack/templates/create_vpc.xml b/ec2stack/templates/create_vpc.xml
index a708e72..5c7c804 100644
--- a/ec2stack/templates/create_vpc.xml
+++ b/ec2stack/templates/create_vpc.xml
@@ -1,9 +1,9 @@
 {% extends "response.xml" %}
 {% block response_content %}
    <vpc>
-      <vpcId>{{ vpc.id }}</vpcId>
-      <state>{{ vpc.state }}</state>
-      <cidrBlock>{{ vpc.cidr }}</cidrBlock>
+      <vpcId>{{ response.id }}</vpcId>
+      <state>{{ response.state }}</state>
+      <cidrBlock>{{ response.cidr }}</cidrBlock>
       <tagSet/>
    </vpc>
 {% endblock %}
\ No newline at end of file


[19/50] cloudstack-ec2stack git commit: Fix snapshot tests

Posted by se...@apache.org.
Fix snapshot tests


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/b6a48b93
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/b6a48b93
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/b6a48b93

Branch: refs/heads/master
Commit: b6a48b93c5ee6677b931a8abcbaa81a3b06a0592
Parents: d027dfb
Author: BroganD1993 <da...@hotmail.com>
Authored: Wed Aug 6 19:50:46 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Wed Aug 6 19:50:46 2014 +0100

----------------------------------------------------------------------
 ec2stack/providers/cloudstack/snapshots.py | 10 +++-------
 ec2stack/templates/create_snapshot.xml     |  2 +-
 ec2stack/templates/snapshots.xml           |  2 +-
 tests/snapshot_tests.py                    |  7 ++++---
 4 files changed, 9 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b6a48b93/ec2stack/providers/cloudstack/snapshots.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/snapshots.py b/ec2stack/providers/cloudstack/snapshots.py
index a75a5fb..69e53ea 100644
--- a/ec2stack/providers/cloudstack/snapshots.py
+++ b/ec2stack/providers/cloudstack/snapshots.py
@@ -4,14 +4,10 @@
 """This module contains functions for handling requests in relation to snapshots.
 """
 
-import uuid
-
-from flask import current_app
-
 from ec2stack import errors
 from ec2stack import helpers
 from ec2stack.providers import cloudstack
-from ec2stack.providers.cloudstack import requester, zones
+from ec2stack.providers.cloudstack import requester
 
 
 @helpers.authentication_required
@@ -46,7 +42,7 @@ def _create_snapshot_response(response):
     @return: Response.
     """
 
-    response = response['snapshot']
+    response = response['vmsnapshot']
     return {
         'template_name_or_list': 'create_snapshot.xml',
         'response_type': 'CreateSnapshotResponse',
@@ -101,7 +97,7 @@ def describe_snapshots():
     """
     args = {'command': 'listSnapshots'}
     response = cloudstack.describe_item(
-        args, 'snapshot', errors.invalid_snapshot_id, 'SnapshotId'
+        args, 'vmsnapshot', errors.invalid_snapshot_id, 'SnapshotId'
     )
 
     return _describe_snapshot_response(

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b6a48b93/ec2stack/templates/create_snapshot.xml
----------------------------------------------------------------------
diff --git a/ec2stack/templates/create_snapshot.xml b/ec2stack/templates/create_snapshot.xml
index b7f6ce0..91ca1cb 100644
--- a/ec2stack/templates/create_snapshot.xml
+++ b/ec2stack/templates/create_snapshot.xml
@@ -2,7 +2,7 @@
 {% block response_content %}
    <snapshot>
       <snapshotId>{{ response.id }}</snapshotId>
-      <volumeId>{{ snapshot.volumeid }}</volumeId>
+      <volumeId>{{ response.volumeid }}</volumeId>
       <status>{{ response.state }}</status>
    </snapshot>
 {% endblock %}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b6a48b93/ec2stack/templates/snapshots.xml
----------------------------------------------------------------------
diff --git a/ec2stack/templates/snapshots.xml b/ec2stack/templates/snapshots.xml
index d4a3cee..1560683 100644
--- a/ec2stack/templates/snapshots.xml
+++ b/ec2stack/templates/snapshots.xml
@@ -1,7 +1,7 @@
 {% extends "response.xml" %}
 {% block response_content %}
     <snapshotSet>
-        {% for snapshot in response.snapshot %}
+        {% for snapshot in response.vmsnapshot %}
         <item>
             <snapshotId>{{ snapshot.id }}</snapshotId>
             <volumeId>{{ snapshot.volumeid }}</volumeId>

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/b6a48b93/tests/snapshot_tests.py
----------------------------------------------------------------------
diff --git a/tests/snapshot_tests.py b/tests/snapshot_tests.py
index a100252..ec9a842 100644
--- a/tests/snapshot_tests.py
+++ b/tests/snapshot_tests.py
@@ -55,7 +55,7 @@ class SnapshotTestCase(Ec2StackAppTestCase):
 
     def test_describe_snapshot_by_name(self):
         data = self.get_example_data()
-        data['Action'] = 'DescribeVpcs'
+        data['Action'] = 'DescribeSnapshots'
         data['SnapshotId'] = 'examplesnapshot'
         data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
 
@@ -71,13 +71,14 @@ class SnapshotTestCase(Ec2StackAppTestCase):
                 data=data
             )
 
+        print response.data
         self.assert_ok(response)
         assert 'DescribeSnapshotsResponse' in response.data
         assert 'examplesnapshot' in response.data
 
     def test_describe_snapshot_by_name_invalid_name(self):
         data = self.get_example_data()
-        data['Action'] = 'DescribeVpcs'
+        data['Action'] = 'DescribeSnapshots'
         data['SnapshotId'] = 'invalidsnapshot'
         data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
 
@@ -94,7 +95,7 @@ class SnapshotTestCase(Ec2StackAppTestCase):
             )
 
         self.assert_bad_request(response)
-        assert 'InvalidSnapshotID.NotFound' in response.data
+        assert 'InvalidSnapshot.NotFound' in response.data
 
     def test_delete_snapshot(self):
         data = self.get_example_data()


[10/50] cloudstack-ec2stack git commit: Merge branch 'vpc_addition' of github.com:BroganD1993/ec2stack into vpc_addition

Posted by se...@apache.org.
Merge branch 'vpc_addition' of github.com:BroganD1993/ec2stack into vpc_addition


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/1249fe8c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/1249fe8c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/1249fe8c

Branch: refs/heads/master
Commit: 1249fe8c000f4b56b577ef4e843e4a587938d2d7
Parents: 6b91349 5406730
Author: BroganD1993 <da...@hotmail.com>
Authored: Fri Jul 18 19:35:07 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Fri Jul 18 19:35:07 2014 +0100

----------------------------------------------------------------------
 ec2stack/__init__.py | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------



[39/50] cloudstack-ec2stack git commit: Adding a dockerfile

Posted by se...@apache.org.
Adding a dockerfile


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/1cbbfa6b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/1cbbfa6b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/1cbbfa6b

Branch: refs/heads/master
Commit: 1cbbfa6b6db415780cb1f2a30b778c9309bf1c18
Parents: 0152984
Author: Sebastien Goasguen <ru...@gmail.com>
Authored: Thu Dec 4 06:46:59 2014 -0500
Committer: Sebastien Goasguen <ru...@gmail.com>
Committed: Thu Dec 4 06:46:59 2014 -0500

----------------------------------------------------------------------
 Dockerfile | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/1cbbfa6b/Dockerfile
----------------------------------------------------------------------
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..388762b
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,13 @@
+FROM ubuntu:14.04
+
+RUN apt-get update
+RUN apt-get install -y python
+RUN apt-get install -y python-pip
+RUN apt-get clean all
+
+RUN pip install ec2stack
+RUN pip install --upgrade requests
+
+EXPOSE 5000
+
+CMD ["ec2stack"]


[02/50] cloudstack-ec2stack git commit: Make new comments consistent with previous

Posted by se...@apache.org.
Make new comments consistent with previous


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/53200c2e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/53200c2e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/53200c2e

Branch: refs/heads/master
Commit: 53200c2e3011e2bccf6c6f029ef2d421d00a045f
Parents: 6f94bae
Author: BroganD1993 <da...@hotmail.com>
Authored: Wed Jul 9 19:49:19 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Wed Jul 9 19:49:19 2014 +0100

----------------------------------------------------------------------
 ec2stack/__init__.py  |  7 ++++++-
 ec2stack/configure.py | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/53200c2e/ec2stack/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/__init__.py b/ec2stack/__init__.py
index ac6b8bb..91ca81d 100644
--- a/ec2stack/__init__.py
+++ b/ec2stack/__init__.py
@@ -49,7 +49,9 @@ def create_app(settings=None):
 
 def _generate_args():
     """
-    Generate command line arguments for ec2stack.
+    Generate command line arguments for ec2stack-configure.
+
+    @return: args.
     """
     parser = argparse.ArgumentParser()
 
@@ -94,6 +96,9 @@ def _load_config_file():
 def _config_from_config_profile(config_file, profile, app):
     """
     Configures ec2stack app based on configuration profile.
+
+    @param config_file: current config file configuration.
+    @param profile: the profile to set the attribute in.
     """
     config = SafeConfigParser()
     config.read(config_file)

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/53200c2e/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index 62f3438..93b4649 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -52,6 +52,8 @@ def _create_config_file(config_folder):
 def _generate_args():
     """
     Generate command line arguments for ec2stack-configure.
+
+    @return: args.
     """
     parser = argparse.ArgumentParser(
         'Command line utility for configuring ec2stack'
@@ -73,6 +75,10 @@ def _generate_args():
 def _modify_config_profile(config_file, profile):
     """
     Modify configuration profile.
+
+    @param config_file: current config file configuration.
+    @param profile: the profile to set the attribute in.
+    @return: configparser configuration.
     """
     config = SafeConfigParser()
     config.read(config_file)
@@ -117,6 +123,10 @@ def _modify_config_profile(config_file, profile):
 def _set_optional_attributes_of_profile(config, profile):
     """
     Modify optional attributes of profile.
+
+    @param config: current configparser configuration.
+    @param profile: the profile to set the attribute in.
+    @return: configparser configuration.
     """
     configure_instance_type_mapings = raw_input(
         'Do you wish to input instance type mappings? (Yes/No): '
@@ -139,6 +149,10 @@ def _set_optional_attributes_of_profile(config, profile):
 def _read_user_instance_mappings(config, profile):
     """
     Add instance type mappings to profile.
+
+    @param config: current configparser configuration.
+    @param profile: the profile to set the attribute in.
+    @return: configparser configuration.
     """
     instance_section = profile + "instancemap"
     if not config.has_section(instance_section):
@@ -166,6 +180,10 @@ def _read_user_instance_mappings(config, profile):
 def _read_user_resource_type_mappings(config, profile):
     """
     Add resource type mappings to profile.
+
+    @param config: current configparser configuration.
+    @param profile: the profile to set the attribute in.
+    @return: configparser configuration.
     """
     resource_section = profile + "resourcemap"
     if not config.has_section(resource_section):
@@ -191,6 +209,16 @@ def _read_user_resource_type_mappings(config, profile):
 
 
 def _set_attribute_of_profile(config, profile, attribute, message, default):
+    """
+    Set attribute of profile
+
+    @param config: current configparser configuration.
+    @param profile: the profile to set the attribute in.
+    @param attribute: the attribute to set.
+    @param message: the message to prompt the user with.
+    @param default: the default value to use if none is entered.
+    @return: configparser configuration.
+    """
     if config.has_option(profile, attribute):
         default = config.get(profile, attribute)
 
@@ -201,6 +229,13 @@ def _set_attribute_of_profile(config, profile, attribute, message, default):
 
 
 def _read_in_config_attribute_or_use_default(message, default):
+    """
+    Add resource type mappings to profile.
+
+    @param message: the message to prompt the user with.
+    @param default: the default value to use if none is entered.
+    @return: configparser configuration.
+    """
     attribute = raw_input(message + ' [' + default + ']: ')
     if attribute == '':
         attribute = default


[38/50] cloudstack-ec2stack git commit: Increase max branch number in functions.

Posted by se...@apache.org.
Increase max branch number in functions.

Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/01529840
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/01529840
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/01529840

Branch: refs/heads/master
Commit: 0152984063159b33fd34aae4dc98d7dba16844aa
Parents: 859455f
Author: Darren <da...@hotmail.com>
Authored: Thu Dec 4 11:29:06 2014 +0000
Committer: Darren <da...@hotmail.com>
Committed: Thu Dec 4 11:29:06 2014 +0000

----------------------------------------------------------------------
 pylint.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/01529840/pylint.rc
----------------------------------------------------------------------
diff --git a/pylint.rc b/pylint.rc
index 1819a65..78b4e71 100644
--- a/pylint.rc
+++ b/pylint.rc
@@ -236,7 +236,7 @@ max-locals=20
 max-returns=6
 
 # Maximum number of branch for function / method body
-max-branches=16
+max-branches=17
 
 # Maximum number of statements in function / method body
 max-statements=50


[36/50] cloudstack-ec2stack git commit: Merge pull request #61 from cloudtrends/patch-1

Posted by se...@apache.org.
Merge pull request #61 from cloudtrends/patch-1

Update setup.py

Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/859455f9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/859455f9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/859455f9

Branch: refs/heads/master
Commit: 859455f9cac9761d6bb50ffd6db93f027c651200
Parents: 1f4db26 dbc7c5d
Author: Ian Duffy <ia...@ianduffy.ie>
Authored: Thu Nov 27 01:10:39 2014 +0000
Committer: Ian Duffy <ia...@ianduffy.ie>
Committed: Thu Nov 27 01:10:39 2014 +0000

----------------------------------------------------------------------
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[03/50] cloudstack-ec2stack git commit: Bump version.

Posted by se...@apache.org.
Bump version.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/252e43e5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/252e43e5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/252e43e5

Branch: refs/heads/master
Commit: 252e43e55d8edb5ad4e66033ebd7ce7ae4d235aa
Parents: 53200c2
Author: BroganD1993 <da...@hotmail.com>
Authored: Wed Jul 9 20:02:01 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Wed Jul 9 20:02:01 2014 +0100

----------------------------------------------------------------------
 HISTORY.rst | 13 +++++++++++++
 setup.py    |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/252e43e5/HISTORY.rst
----------------------------------------------------------------------
diff --git a/HISTORY.rst b/HISTORY.rst
index 946f908..ebf313b 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,19 @@
 History
 =======
 
+0.5.0 (9-07-2014)
+__________________
+
+* Add support for configuration profiles
+
+    `$ ec2stack-configure --profile exampleprofile`
+
+    `$ ec2stack --profile exampleprofile`
+
+* Give user the ability to debug app
+
+    `$ ec2stack --debug True`
+
 0.4.0 (9-06-2014)
 __________________
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/252e43e5/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 2f48316..9694b0e 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ def read_file(name):
 
 
 PROJECT = 'ec2stack'
-VERSION = '0.4'
+VERSION = '0.5'
 URL = 'http://github.com/imduffy15/ec2stack'
 AUTHOR = 'Darren Brogan, Ian Duffy'
 AUTHOR_EMAIL = 'brogand2@mail.dcu.ie, duffyi3@mail.dcu.ie'


[17/50] cloudstack-ec2stack git commit: Forgot vpc test for invalid vpc id

Posted by se...@apache.org.
Forgot vpc test for invalid vpc id


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/7c5417e9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/7c5417e9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/7c5417e9

Branch: refs/heads/master
Commit: 7c5417e9a1a7a7fc53932651da99d212ebf53977
Parents: 055932e
Author: BroganD1993 <da...@hotmail.com>
Authored: Tue Jul 22 19:19:24 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Tue Jul 22 19:19:24 2014 +0100

----------------------------------------------------------------------
 tests/vpc_tests.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/7c5417e9/tests/vpc_tests.py
----------------------------------------------------------------------
diff --git a/tests/vpc_tests.py b/tests/vpc_tests.py
index da05c58..b8df263 100644
--- a/tests/vpc_tests.py
+++ b/tests/vpc_tests.py
@@ -114,6 +114,28 @@ class VpcTestCase(Ec2StackAppTestCase):
         assert 'DescribeVpcsResponse' in response.data
         assert 'examplevpc' in response.data
 
+
+    def test_describe_vpc_by_name_invalid_name(self):
+        data = self.get_example_data()
+        data['Action'] = 'DescribeVpcs'
+        data['VpcId'] = 'invalidevpc'
+        data['Signature'] = generate_signature(data, 'POST', 'localhost', '/')
+
+        get = mock.Mock()
+        get.return_value.text = read_file(
+            'tests/data/valid_describe_vpc.json'
+        )
+        get.return_value.status_code = 200
+
+        with mock.patch('requests.get', get):
+            response = self.post(
+                '/',
+                data=data
+            )
+
+        self.assert_bad_request(response)
+        assert 'InvalidVpcID.NotFound' in response.data
+
     def test_delete_vpc(self):
         data = self.get_example_data()
         data['Action'] = 'DeleteVpc'


[37/50] cloudstack-ec2stack git commit: add support for --subnet-id

Posted by se...@apache.org.
add support for --subnet-id


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/272a98a5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/272a98a5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/272a98a5

Branch: refs/heads/master
Commit: 272a98a51e01d21cedc5dbcdb190157fda1253a3
Parents: 859455f
Author: Nuno Tavares <n....@tech.leaseweb.com>
Authored: Thu Dec 4 11:30:40 2014 +0100
Committer: Nuno Tavares <n....@tech.leaseweb.com>
Committed: Thu Dec 4 11:30:40 2014 +0100

----------------------------------------------------------------------
 ec2stack/providers/cloudstack/instances.py | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/272a98a5/ec2stack/providers/cloudstack/instances.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/instances.py b/ec2stack/providers/cloudstack/instances.py
index 01d2127..7ed22ab 100644
--- a/ec2stack/providers/cloudstack/instances.py
+++ b/ec2stack/providers/cloudstack/instances.py
@@ -226,6 +226,9 @@ def _run_instance_request():
 
         args['securitygroupnames'] = ",".join(securitygroupnames)
 
+    if helpers.get('SubnetId') is not None:
+        args['networkids'] = helpers.get('SubnetId')
+
     args['command'] = 'deployVirtualMachine'
 
     response = requester.make_request_async(args)


[11/50] cloudstack-ec2stack git commit: Shhh travis, it'll all be over soon

Posted by se...@apache.org.
Shhh travis, it'll all be over soon


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/44fb5bd7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/44fb5bd7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/44fb5bd7

Branch: refs/heads/master
Commit: 44fb5bd7ba366cf052b69e9b609dcba7bfebca52
Parents: 1249fe8
Author: BroganD1993 <da...@hotmail.com>
Authored: Fri Jul 18 20:10:49 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Fri Jul 18 20:10:49 2014 +0100

----------------------------------------------------------------------
 ec2stack/configure.py                 | 1 +
 ec2stack/errors.py                    | 2 ++
 ec2stack/providers/cloudstack/vpcs.py | 3 +--
 3 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/44fb5bd7/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index 3fa337d..cc2e6f6 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -104,6 +104,7 @@ def _modify_config_profile(config_file, profile, advanced_network_enabled):
 
     return config
 
+
 def _set_mandatory_attributes_of_profile(config, profile):
     """
     Modify mandatory attributes of profile.

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/44fb5bd7/ec2stack/errors.py
----------------------------------------------------------------------
diff --git a/ec2stack/errors.py b/ec2stack/errors.py
index ba170bf..1e50ea0 100644
--- a/ec2stack/errors.py
+++ b/ec2stack/errors.py
@@ -162,6 +162,7 @@ def invalid_resource_id():
         'The specified ID for the resource you are trying to tag is not valid.'
     )
 
+
 def invalid_vpc_range():
     """
     Invalid cidr block.
@@ -174,6 +175,7 @@ def invalid_vpc_range():
         'The specified CIDR block range is not valid.'
     )
 
+
 def invalid_vpc_id():
     """
     VPC with this ID does not exist.

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/44fb5bd7/ec2stack/providers/cloudstack/vpcs.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/vpcs.py b/ec2stack/providers/cloudstack/vpcs.py
index 7386e3f..55c81d8 100644
--- a/ec2stack/providers/cloudstack/vpcs.py
+++ b/ec2stack/providers/cloudstack/vpcs.py
@@ -1,4 +1,3 @@
-
 #!/usr/bin/env python
 # encoding: utf-8
 
@@ -101,6 +100,7 @@ def _delete_vpc_response():
         'return': 'true'
     }
 
+
 @helpers.authentication_required
 def describe_vpcs():
     """
@@ -130,4 +130,3 @@ def _describe_vpc_response(response):
         'response_type': 'DescribeVpcsResponse',
         'response': response
     }
-


[44/50] cloudstack-ec2stack git commit: remove unused imports

Posted by se...@apache.org.
remove unused imports


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/c4d1a677
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/c4d1a677
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/c4d1a677

Branch: refs/heads/master
Commit: c4d1a677825f8b7ea227ff24602a97a66ce35fb4
Parents: 2662cae
Author: Ian Duffy <ia...@ianduffy.ie>
Authored: Fri Dec 5 05:24:16 2014 +0000
Committer: Ian Duffy <ia...@ianduffy.ie>
Committed: Fri Dec 5 05:24:16 2014 +0000

----------------------------------------------------------------------
 ec2stack/configure.py | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/c4d1a677/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index 444d029..22dd22a 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -7,9 +7,7 @@
 import os
 import argparse
 
-from alembic import command
 from ConfigParser import SafeConfigParser
-from alembic.config import Config as AlembicConfig
 
 
 def main():


[29/50] cloudstack-ec2stack git commit: Continue work on simulated ebs / instance store: undecided of approah

Posted by se...@apache.org.
Continue work on simulated ebs / instance store: undecided of approah


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/36ba44f6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/36ba44f6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/36ba44f6

Branch: refs/heads/master
Commit: 36ba44f670bbe8ba95ee8ded01841e458165b003
Parents: a4965ff
Author: BroganD1993 <da...@hotmail.com>
Authored: Fri Aug 15 22:17:17 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Fri Aug 15 22:17:17 2014 +0100

----------------------------------------------------------------------
 ec2stack/configure.py                      |  2 +-
 ec2stack/providers/cloudstack/instances.py | 44 +++++++++++++++++++------
 ec2stack/providers/cloudstack/volumes.py   | 29 +++++++++++-----
 tests/volume_tests.py                      | 17 +++++++---
 4 files changed, 69 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/36ba44f6/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index 25e79d6..a80b70d 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -170,7 +170,7 @@ def _set_optional_attributes_of_profile(config, profile):
     """
 
     configure_instance_type_mapings = raw_input(
-        'Do you wish to input a local custom storage disk? (Yes/No): '
+        'Do you wish to input a local custom storage disk for instances? (Yes/No): '
     )
 
     if configure_instance_type_mapings.lower() in ['yes', 'y']:

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/36ba44f6/ec2stack/providers/cloudstack/instances.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/instances.py b/ec2stack/providers/cloudstack/instances.py
index 68c8c49..b391c51 100644
--- a/ec2stack/providers/cloudstack/instances.py
+++ b/ec2stack/providers/cloudstack/instances.py
@@ -8,7 +8,7 @@ instances.
 from flask import current_app
 
 from ec2stack.providers import cloudstack
-from ec2stack.providers.cloudstack import requester, service_offerings, zones
+from ec2stack.providers.cloudstack import requester, service_offerings, zones, disk_offerings
 from ec2stack import helpers, errors
 
 
@@ -122,7 +122,21 @@ def _run_instance_request():
 
     @return: Response.
     """
+
     args = {}
+    if helpers.contains_parameter('Placement.AvailabilityZone'):
+        zone_id = zones.get_zone(
+            helpers.get('Placement.AvailabilityZone')
+        )
+    else:
+        zone_id = zones.get_zone(
+            current_app.config['CLOUDSTACK_DEFAULT_ZONE']
+        )['id']
+
+    if helpers.get('BlockDeviceMapping.1.Ebs.VolumeType') is not None:
+        args = _get_simulated_combination_instance_storage_args(zone_id)
+    else:
+        args['zoneid'] = zone_id
 
     if helpers.get('InstanceType') is None:
         instance_type = 'm1.small'
@@ -139,15 +153,6 @@ def _run_instance_request():
         service_offerings.get_service_offering(instance_type)['id']
     args['templateid'] = helpers.get('ImageId')
 
-    if helpers.contains_parameter('Placement.AvailabilityZone'):
-        args['zoneid'] = zones.get_zone(
-            helpers.get('Placement.AvailabilityZone')
-        )
-    else:
-        args['zoneid'] = zones.get_zone(
-            current_app.config['CLOUDSTACK_DEFAULT_ZONE']
-        )['id']
-
     if helpers.contains_parameter('KeyName'):
         args['keypair'] = helpers.get('KeyName')
 
@@ -178,6 +183,25 @@ def _run_instance_request():
 
     return response
 
+def _get_simulated_combination_instance_storage_args(zone_id):
+    args = {}
+    disk_type = helpers.get('BlockDeviceMapping.1.Ebs.VolumeType')
+    if disk_type == 'gp2':
+        if 'CLOUDSTACK_LOCAL_CUSTOM_DISK_OFFERING' in current_app.config:
+            args['diskofferingid'] = disk_offerings.get_disk_offering(
+                current_app.config['CLOUDSTACK_LOCAL_CUSTOM_DISK_OFFERING']
+            )['id']
+        else:
+            errors.invalid_request(
+                str('CLOUDSTACK_LOCAL_CUSTOM_DISK_OFFERING') + " not found in "
+                "configuration, no able to configure gp2 disk, please run ec2stack-configure and chose to configure "
+                "a local disk")
+
+    if helpers.get('BlockDeviceMapping.1.Ebs.VolumeSize') is None:
+        errors.invalid_request("VolumeSize not found in BlockDeviceMapping")
+    else:
+        args['size'] = helpers.get('BlockDeviceMapping.1.Ebs.VolumeSize')
+
 
 def _run_instance_response(response):
     """

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/36ba44f6/ec2stack/providers/cloudstack/volumes.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/volumes.py b/ec2stack/providers/cloudstack/volumes.py
index 8b0cb4e..c89ed26 100644
--- a/ec2stack/providers/cloudstack/volumes.py
+++ b/ec2stack/providers/cloudstack/volumes.py
@@ -92,26 +92,39 @@ def _create_volume_request():
     """
     args = {}
 
+    zone_name = helpers.get('AvailabilityZone')
+    zone_id = zones.get_zone(zone_name)['id']
+
+    args['zoneid'] = zone_id
+
     if helpers.contains_parameter('SnapshotId'):
         args['snapshotid'] = helpers.get('SnapshotId')
+        args['name'] = uuid.uuid1()
+        args['command'] = 'createVolume'
+        response = requester.make_request_async(args)
 
     else:
         helpers.require_parameters(['Size'])
-        args['size'] = helpers.get('Size')
-        args['diskofferingid'] = disk_offerings.get_disk_offering(
+        size = helpers.get('Size')
+        disk_id = disk_offerings.get_disk_offering(
             current_app.config['CLOUDSTACK_CUSTOM_DISK_OFFERING']
         )['id']
+        response = create_cloudstack_volume_from_disk(disk_id, size, args)
 
-    zone_name = helpers.get('AvailabilityZone')
-    zone_id = zones.get_zone(zone_name)['id']
+    return response
 
-    args['zoneid'] = zone_id
+def create_cloudstack_volume_from_disk(disk_id, size, args):
+    """
+    Create a volume from disk offering.
+
+    @return: Response.
+    """
     args['command'] = 'createVolume'
+    args['diskofferingid'] = disk_id
     args['name'] = uuid.uuid1()
+    args['size'] = size
 
-    response = requester.make_request_async(args)
-
-    return response
+    return requester.make_request_async(args)
 
 
 def _create_volume_response(response):

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/36ba44f6/tests/volume_tests.py
----------------------------------------------------------------------
diff --git a/tests/volume_tests.py b/tests/volume_tests.py
index 7d56402..ad593a2 100644
--- a/tests/volume_tests.py
+++ b/tests/volume_tests.py
@@ -240,11 +240,20 @@ class VolumeTestCase(Ec2StackAppTestCase):
         )
         get_request.return_value.status_code = 200
 
+        get_zone = mock.Mock()
+        get_zone.return_value = json.loads(read_file(
+            'tests/data/zones_search.json'
+        ))
+
         with mock.patch('requests.get', get_request):
-            response = self.post(
-                '/',
-                data=data
-            )
+            with mock.patch(
+                'ec2stack.providers.cloudstack.zones.get_zone',
+                get_zone
+            ):
+                response = self.post(
+                    '/',
+                    data=data
+                )
 
         self.assert_bad_request(response)
         assert 'InvalidDiskOffering.NotFound' in response.data


[49/50] cloudstack-ec2stack git commit: pep8 issues

Posted by se...@apache.org.
pep8 issues


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/7b7e8ee5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/7b7e8ee5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/7b7e8ee5

Branch: refs/heads/master
Commit: 7b7e8ee5fdfb6473754f4ef207ab93db9692ec0d
Parents: 882dc5f
Author: Ian Duffy <ia...@ianduffy.ie>
Authored: Mon Apr 13 15:37:16 2015 +0100
Committer: Ian Duffy <ia...@ianduffy.ie>
Committed: Mon Apr 13 15:37:16 2015 +0100

----------------------------------------------------------------------
 ec2stack/__init__.py  | 3 ++-
 ec2stack/configure.py | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/7b7e8ee5/ec2stack/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/__init__.py b/ec2stack/__init__.py
index 1e5b729..def8727 100644
--- a/ec2stack/__init__.py
+++ b/ec2stack/__init__.py
@@ -125,7 +125,8 @@ def _config_from_config_profile(config_file, profile, app):
     config.read(config_file)
 
     if not config.has_section(profile):
-        sys.exit('No profile matching ' + profile + ' found in configuration, please run ec2stack-configure -p ' + profile)
+        sys.exit('No profile matching ' + profile +
+                 ' found in configuration, please run ec2stack-configure -p ' + profile)
 
     for attribute in config.options(profile):
         app.config[attribute.upper()] = config.get(profile, attribute)

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/7b7e8ee5/ec2stack/configure.py
----------------------------------------------------------------------
diff --git a/ec2stack/configure.py b/ec2stack/configure.py
index 9255c1d..0c7f9d4 100644
--- a/ec2stack/configure.py
+++ b/ec2stack/configure.py
@@ -192,7 +192,8 @@ def _set_optional_attributes_of_profile(config, profile):
         config = _read_user_instance_mappings(config, profile)
 
     configure_resource_type_mapings = raw_input(
-        'Do you wish to input resource type to resource id mappings' + ' for tag support? (Yes/No): '
+        'Do you wish to input resource type to resource id mappings' +
+        ' for tag support? (Yes/No): '
     )
 
     if configure_resource_type_mapings.lower() in ['yes', 'y']:


[08/50] cloudstack-ec2stack git commit: Remove manual debug setting

Posted by se...@apache.org.
Remove manual debug setting

Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/54067305
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/54067305
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/54067305

Branch: refs/heads/master
Commit: 54067305697dbcbc1f6fe69ace04696594f6ce46
Parents: 174c798
Author: Darren <da...@hotmail.com>
Authored: Fri Jul 18 12:54:21 2014 +0100
Committer: Darren <da...@hotmail.com>
Committed: Fri Jul 18 12:54:21 2014 +0100

----------------------------------------------------------------------
 ec2stack/__init__.py | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/54067305/ec2stack/__init__.py
----------------------------------------------------------------------
diff --git a/ec2stack/__init__.py b/ec2stack/__init__.py
index 1c75571..91ca81d 100644
--- a/ec2stack/__init__.py
+++ b/ec2stack/__init__.py
@@ -31,7 +31,6 @@ def create_app(settings=None):
         args = _generate_args()
         profile = args.pop('profile')
         app.config['DEBUG'] = args.pop('debug')
-        app.config['DEBUG'] = True
         config_file = _load_config_file()
         database_uri = _load_database()
         _config_from_config_profile(config_file, profile, app)


[24/50] cloudstack-ec2stack git commit: Fix desribe snapshot by snapshot id command

Posted by se...@apache.org.
Fix desribe snapshot by snapshot id command


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/873bf658
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/873bf658
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/873bf658

Branch: refs/heads/master
Commit: 873bf6582cdae19d696039dffed96625ded163a4
Parents: 3f96112
Author: BroganD1993 <da...@hotmail.com>
Authored: Sun Aug 10 15:27:12 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Sun Aug 10 15:27:12 2014 +0100

----------------------------------------------------------------------
 ec2stack/providers/cloudstack/snapshots.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/873bf658/ec2stack/providers/cloudstack/snapshots.py
----------------------------------------------------------------------
diff --git a/ec2stack/providers/cloudstack/snapshots.py b/ec2stack/providers/cloudstack/snapshots.py
index 8f3dc2d..6542d84 100644
--- a/ec2stack/providers/cloudstack/snapshots.py
+++ b/ec2stack/providers/cloudstack/snapshots.py
@@ -104,7 +104,7 @@ def describe_snapshots():
     """
     args = {'command': 'listSnapshots'}
     response = cloudstack.describe_item(
-        args, 'vmsnapshot', errors.invalid_snapshot_id, 'SnapshotId'
+        args, 'snapshot', errors.invalid_snapshot_id, 'SnapshotId'
     )
 
     return _describe_snapshot_response(


[27/50] cloudstack-ec2stack git commit: Bump version

Posted by se...@apache.org.
Bump version


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/32b78846
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/32b78846
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/32b78846

Branch: refs/heads/master
Commit: 32b788466cc37536cd27d0d33074fa786363e774
Parents: f0a8c11
Author: BroganD1993 <da...@hotmail.com>
Authored: Mon Aug 11 15:17:10 2014 +0100
Committer: BroganD1993 <da...@hotmail.com>
Committed: Mon Aug 11 15:17:10 2014 +0100

----------------------------------------------------------------------
 HISTORY.rst | 8 ++++++++
 setup.py    | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/32b78846/HISTORY.rst
----------------------------------------------------------------------
diff --git a/HISTORY.rst b/HISTORY.rst
index ed6e009..40a00e3 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,14 @@
 History
 =======
 
+0.7.0 (11-08-2014)
+__________________
+
+* Added support for snapshot operations
+    * createSnapshot
+    * deleteSnapshot
+    * listSnapshots
+
 0.6.1 (7-08-2014)
 _________________
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/32b78846/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index a24d436..1da74dc 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ def read_file(name):
 
 
 PROJECT = 'ec2stack'
-VERSION = '0.6.1'
+VERSION = '0.7'
 URL = 'http://github.com/imduffy15/ec2stack'
 AUTHOR = 'Darren Brogan, Ian Duffy'
 AUTHOR_EMAIL = 'brogand2@mail.dcu.ie, duffyi3@mail.dcu.ie'


[23/50] cloudstack-ec2stack git commit: Currect test data

Posted by se...@apache.org.
Currect test data


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/commit/3f96112f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/tree/3f96112f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/diff/3f96112f

Branch: refs/heads/master
Commit: 3f96112fbbd77c41942358dec247e29b410b143b
Parents: b30b27e
Author: brogand1993 <da...@hotmail.com>
Authored: Sat Aug 9 13:46:57 2014 +0100
Committer: brogand1993 <da...@hotmail.com>
Committed: Sat Aug 9 13:46:57 2014 +0100

----------------------------------------------------------------------
 tests/data/valid_create_snapshot.json        |  2 +-
 tests/data/valid_create_volume.json          | 38 +++++++++++++++++++++++
 tests/data/valid_create_volume_response.json | 38 -----------------------
 tests/data/valid_describe_snapshot.json      |  2 +-
 tests/data/valid_describe_snapshots.json     |  2 +-
 tests/disk_offering_tests.py                 |  2 +-
 tests/volume_tests.py                        |  4 +--
 tests/zones_tests.py                         |  2 +-
 8 files changed, 45 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3f96112f/tests/data/valid_create_snapshot.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_create_snapshot.json b/tests/data/valid_create_snapshot.json
index f8661cd..5d711da 100644
--- a/tests/data/valid_create_snapshot.json
+++ b/tests/data/valid_create_snapshot.json
@@ -8,7 +8,7 @@
         "jobresultcode": 0,
         "jobresulttype": "object",
         "jobresult": {
-            "vmsnapshot": {
+            "snapshot": {
                 "id": "e0e04b84-6178-49a7-9d2f-a2cc6a82d4e4",
                 "name": "i-2-12-VM_VS_20140805203303",
                 "state": "Ready",

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3f96112f/tests/data/valid_create_volume.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_create_volume.json b/tests/data/valid_create_volume.json
new file mode 100644
index 0000000..79826ba
--- /dev/null
+++ b/tests/data/valid_create_volume.json
@@ -0,0 +1,38 @@
+{
+    "queryasyncjobresultresponse": {
+        "jobprocstatus": 0,
+        "created": "2014-02-25T19:46:35+0000",
+        "cmd": "org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd",
+        "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
+        "jobstatus": 1,
+        "jobid": "1f32404b-d067-43e8-8835-4cc1c55d737a",
+        "jobresultcode": 0,
+        "jobresulttype": "object",
+        "jobresult": {
+            "volume": {
+                "size": 10737418240,
+                "diskofferingname": "Custom",
+                "account": "admin",
+                "domainid": "2edae3e4-95e4-11e3-b2e4-d19c9d3e5e1d",
+                "name": "f0e2a699-1196-49bd-90cd-af809f4c32ea",
+                "created": "2014-02-25T19:46:34+0000",
+                "storagetype": "shared",
+                "type": "DATADISK",
+                "tags": [],
+                "domain": "ROOT",
+                "jobstatus": 0,
+                "jobid": "1f32404b-d067-43e8-8835-4cc1c55d737a",
+                "destroyed": false,
+                "state": "Allocated",
+                "diskofferingdisplaytext": "Custom Disk",
+                "isextractable": true,
+                "displayvolume": true,
+                "zoneid": "1e47a2fc-61c7-401c-b90e-416b472ada64",
+                "diskofferingid": "46f0a62e-ba3c-4a49-b619-877a8b2a07ed",
+                "id": "8552cdce-879a-42f3-bdb5-2e7f55a38996",
+                "zonename": "Sandbox-simulator"
+            }
+        },
+        "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3f96112f/tests/data/valid_create_volume_response.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_create_volume_response.json b/tests/data/valid_create_volume_response.json
deleted file mode 100644
index 79826ba..0000000
--- a/tests/data/valid_create_volume_response.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-    "queryasyncjobresultresponse": {
-        "jobprocstatus": 0,
-        "created": "2014-02-25T19:46:35+0000",
-        "cmd": "org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd",
-        "userid": "2edb33ec-95e4-11e3-b2e4-d19c9d3e5e1d",
-        "jobstatus": 1,
-        "jobid": "1f32404b-d067-43e8-8835-4cc1c55d737a",
-        "jobresultcode": 0,
-        "jobresulttype": "object",
-        "jobresult": {
-            "volume": {
-                "size": 10737418240,
-                "diskofferingname": "Custom",
-                "account": "admin",
-                "domainid": "2edae3e4-95e4-11e3-b2e4-d19c9d3e5e1d",
-                "name": "f0e2a699-1196-49bd-90cd-af809f4c32ea",
-                "created": "2014-02-25T19:46:34+0000",
-                "storagetype": "shared",
-                "type": "DATADISK",
-                "tags": [],
-                "domain": "ROOT",
-                "jobstatus": 0,
-                "jobid": "1f32404b-d067-43e8-8835-4cc1c55d737a",
-                "destroyed": false,
-                "state": "Allocated",
-                "diskofferingdisplaytext": "Custom Disk",
-                "isextractable": true,
-                "displayvolume": true,
-                "zoneid": "1e47a2fc-61c7-401c-b90e-416b472ada64",
-                "diskofferingid": "46f0a62e-ba3c-4a49-b619-877a8b2a07ed",
-                "id": "8552cdce-879a-42f3-bdb5-2e7f55a38996",
-                "zonename": "Sandbox-simulator"
-            }
-        },
-        "accountid": "2edb0c28-95e4-11e3-b2e4-d19c9d3e5e1d"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3f96112f/tests/data/valid_describe_snapshot.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_describe_snapshot.json b/tests/data/valid_describe_snapshot.json
index b4888a2..ec18171 100644
--- a/tests/data/valid_describe_snapshot.json
+++ b/tests/data/valid_describe_snapshot.json
@@ -1,7 +1,7 @@
 {
     "listvmsnapshotresponse": {
         "count": 1,
-        "vmSnapshot": [{
+        "snapshot": [{
             "id": "examplesnapshot",
             "name": "i-2-12-VM_VS_20140805203432",
             "state": "Ready",

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3f96112f/tests/data/valid_describe_snapshots.json
----------------------------------------------------------------------
diff --git a/tests/data/valid_describe_snapshots.json b/tests/data/valid_describe_snapshots.json
index 6753646..a1d5ca1 100644
--- a/tests/data/valid_describe_snapshots.json
+++ b/tests/data/valid_describe_snapshots.json
@@ -1,7 +1,7 @@
 {
     "listvmsnapshotresponse": {
         "count": 2,
-        "vmSnapshot": [{
+        "snapshot": [{
             "id": "9f2f067f-3ae7-427d-95d9-3c338dcbd5a3",
             "name": "i-2-12-VM_VS_20140805203432",
             "state": "Ready",

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3f96112f/tests/disk_offering_tests.py
----------------------------------------------------------------------
diff --git a/tests/disk_offering_tests.py b/tests/disk_offering_tests.py
index fcdaca2..3c077ec 100644
--- a/tests/disk_offering_tests.py
+++ b/tests/disk_offering_tests.py
@@ -20,7 +20,7 @@ class DiskOfferingsTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/valid_create_volume_response.json'
+            'tests/data/valid_create_volume.json'
         )
         get.return_value.status_code = 200
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3f96112f/tests/volume_tests.py
----------------------------------------------------------------------
diff --git a/tests/volume_tests.py b/tests/volume_tests.py
index 6e6c5c3..7d56402 100644
--- a/tests/volume_tests.py
+++ b/tests/volume_tests.py
@@ -112,7 +112,7 @@ class VolumeTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/valid_create_volume_response.json'
+            'tests/data/valid_create_volume.json'
         )
         get.return_value.status_code = 200
 
@@ -152,7 +152,7 @@ class VolumeTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/valid_create_volume_response.json'
+            'tests/data/valid_create_volume.json'
         )
         get.return_value.status_code = 200
 

http://git-wip-us.apache.org/repos/asf/cloudstack-ec2stack/blob/3f96112f/tests/zones_tests.py
----------------------------------------------------------------------
diff --git a/tests/zones_tests.py b/tests/zones_tests.py
index 5f0d9e5..13f3331 100644
--- a/tests/zones_tests.py
+++ b/tests/zones_tests.py
@@ -104,7 +104,7 @@ class ZonesTestCase(Ec2StackAppTestCase):
 
         get = mock.Mock()
         get.return_value.text = read_file(
-            'tests/data/valid_create_volume_response.json'
+            'tests/data/valid_create_volume.json'
         )
         get.return_value.status_code = 200