cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasanna Santhanam (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-2577) Marvin listPortForwardingRules API file has spurious class definition
Date Mon, 20 May 2013 11:15:16 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-2577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13661906#comment-13661906
] 

Prasanna Santhanam commented on CLOUDSTACK-2577:
------------------------------------------------

This is likely a change in behaviour of the API. When an object's
record is erased from the cloudstack DB, as in the case of FW rules,
the API server returns the exception of InvalidEntity because the UUID
doesn't exist in the system anymore.

In case of other entities say Accounts, cloudstack retains the record but marks
it as 'removed'.  So when a user lists the object with the uuid, he gets an
empty response.

This is something Rohit and I debated about - from the point of the API server
it's not clear whether the UUID coming in is something that was once valid or
something that never existed. In the case of entities like firewall rules, we
err on the latter - entity doesn't exist.

Can you fix the test by handling the exception?
        nat_rule.delete(self.apiclient)

        try:
            list_nat_rule_response = list_nat_rules(
                                                self.apiclient,
                                                id=nat_rule.id
                                                )
        except CloudStackAPIException:
            self.debug("FW rule is deleted")


Note below the ids start from 7 not 1, because those rules are now gone.
mysql> select id, uuid, ip_address_id, start_port, end_port, protocol from firewall_rules;
+----+--------------------------------------+---------------+------------+----------+----------+
| id | uuid                                 | ip_address_id | start_port | end_port | protocol
|
+----+--------------------------------------+---------------+------------+----------+----------+
|  7 | 187402c5-60b8-4d08-954c-74b5b3e05ffd |             1 |         22 |       22 | tcp
     |
|  8 | a2497c0e-94f2-41f7-aaf1-9590b91b8bd4 |             1 |         22 |       22 | tcp
     |
| 15 | 5c657e11-7c60-4913-92d5-89eae209b06d |            16 |         22 |       22 | tcp
     |
| 17 | 5415227f-bb6e-41e9-ae83-48a28927aa34 |            17 |         22 |       22 | tcp
     |
| 18 | 504d021f-1e6a-4e63-89ab-331b61f73a6e |            17 |         22 |       22 | tcp
     |
| 19 | a1661008-edf1-4e69-848c-2f1d4aba3266 |            11 |         22 |       22 | tcp
     |
| 22 | 834bdd5c-c6e4-4af2-8c06-2962237fab0c |            11 |         22 |       22 | tcp
     |
+----+--------------------------------------+---------------+------------+----------+----------+
7 rows in set (0.00 sec)

                
> Marvin listPortForwardingRules API file has spurious class definition
> ---------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-2577
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2577
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Automation
>            Reporter: Girish Shilamkar
>            Assignee: Prasanna Santhanam
>
> Tests using listportforwardingrules are failing with latest marvin.
> listportforwardingrules failed, due to: errorCode: 431, errorText:Unable to execute API
command listportforwardingrules due to invalid value. Invalid parameter id value=c9373d55-3d01-480d-98dc-2365d3927378
due to incorrect long value format, or entity does not exist or due to incorrect parameter
annotation for the field in api cmd class.
> I checked the  listPortForwardingRules.py and found that "class tags" was added to this
file resulting in the above failure.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message