From 2a6f97940f71c056b4bfb0cd9a86f5d676abc4e1 Mon Sep 17 00:00:00 2001 From: Tushar Patil Date: Mon, 11 Jul 2011 13:34:39 -0700 Subject: add optional parameter networks to the Create server OS API --- nova/exception.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index a6776b64f..a1803d4f6 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -142,6 +142,10 @@ class Invalid(NovaException): message = _("Unacceptable parameters.") +class AlreadyInUse(NovaException): + message = _("Already is in use.") + + class InvalidSignature(Invalid): message = _("Invalid signature %(signature)s for user %(user)s.") @@ -361,6 +365,15 @@ class NoNetworksFound(NotFound): message = _("No networks defined.") +class NetworkNotFoundForProject(NotFound): + message = _("Either Network %(network_id)s is not present or " + "is not assigned to the project %(project_id)s.") + + +class NetworkHostNotSet(NovaException): + message = _("Host is not set to the network (%(network_id)s).") + + class DatastoreNotFound(NotFound): message = _("Could not find the datastore reference(s) which the VM uses.") @@ -385,6 +398,19 @@ class FixedIpNotFoundForHost(FixedIpNotFound): message = _("Host %(host)s has zero fixed ips.") +class FixedIpNotFoundForNetwork(FixedIpNotFound): + message = _("Fixed IP address (%(address)s) does not exist in " + "network (%(network_id)s).") + + +class FixedIpAlreadyInUse(AlreadyInUse): + message = _("Fixed IP address %(address)s is already in use.") + + +class FixedIpInvalid(Invalid): + message = _("Fixed IP address %(address)s is invalid.") + + class NoMoreFixedIps(Error): message = _("Zero fixed ips available.") -- cgit From 9081e8b62ea01828238ecaebdcf3e627ada3fe9a Mon Sep 17 00:00:00 2001 From: Tushar Patil Date: Tue, 16 Aug 2011 16:04:18 -0700 Subject: Added uuid for networks and made changes to the Create server API format to accept network as uuid instead of id --- nova/exception.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 0c07934cf..c68c89cad 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -428,7 +428,7 @@ class NoNetworksFound(NotFound): class NetworkNotFoundForProject(NotFound): - message = _("Either Network %(network_id)s is not present or " + message = _("Either Network uuid %(network_uuid)s is not present or " "is not assigned to the project %(project_id)s.") @@ -471,7 +471,7 @@ class FixedIpNotFoundForHost(FixedIpNotFound): class FixedIpNotFoundForNetwork(FixedIpNotFound): message = _("Fixed IP address (%(address)s) does not exist in " - "network (%(network_id)s).") + "network (%(network_uuid)s).") class FixedIpAlreadyInUse(AlreadyInUse): -- cgit From d27a4d4a59a0103762ece2776ddd484629a72d54 Mon Sep 17 00:00:00 2001 From: Tushar Patil Date: Fri, 19 Aug 2011 14:25:41 -0700 Subject: Fixed review comments --- nova/exception.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 97275fa25..262122990 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -185,10 +185,6 @@ class Invalid(NovaException): message = _("Unacceptable parameters.") -class AlreadyInUse(NovaException): - message = _("Already is in use.") - - class InvalidSignature(Invalid): message = _("Invalid signature %(signature)s for user %(user)s.") @@ -474,7 +470,7 @@ class FixedIpNotFoundForNetwork(FixedIpNotFound): "network (%(network_uuid)s).") -class FixedIpAlreadyInUse(AlreadyInUse): +class FixedIpAlreadyInUse(NovaException): message = _("Fixed IP address %(address)s is already in use.") -- cgit From bb989133196744779527e36cba22a76bd44e533b Mon Sep 17 00:00:00 2001 From: Tushar Patil Date: Sat, 20 Aug 2011 15:38:13 -0700 Subject: add/remove security groups to/from the servers as server actions --- nova/exception.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index b09d50797..e8cb7bcb5 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -541,6 +541,16 @@ class SecurityGroupNotFoundForRule(SecurityGroupNotFound): message = _("Security group with rule %(rule_id)s not found.") +class SecurityGroupExistsForInstance(Invalid): + message = _("Security group %(security_group_id)s is already associated" + " with the instance %(instance_id)s") + + +class SecurityGroupNotExistsForInstance(Invalid): + message = _("Security group %(security_group_id)s is not associated with" + " the instance %(instance_id)s") + + class MigrationNotFound(NotFound): message = _("Migration %(migration_id)s could not be found.") -- cgit