You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "Dave Cahill (JIRA)" <ji...@apache.org> on 2012/11/16 08:48:12 UTC

[jira] [Created] (CLOUDSTACK-499) cloudmonkey CLI can't accept complex parameters

Dave Cahill created CLOUDSTACK-499:
--------------------------------------

             Summary: cloudmonkey CLI can't accept complex parameters
                 Key: CLOUDSTACK-499
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-499
             Project: CloudStack
          Issue Type: Bug
          Components: Usage
    Affects Versions: 4.1.0
         Environment: Ubuntu 12.04, KVM hypervisor
            Reporter: Dave Cahill
             Fix For: 4.1.0


When setting up a networkoffering, there's a serviceProviderList parameter which is a list of items, each of which has several key value pairs.

According to Rohit (on dev list):
"The way maps are handled in url are very different than how cloudmonkey parses and passing key,values.
This actually needs to be fixed in Marvin, I've figured out a way but it may cause issues with marvin, will discuss with Prasanna and fix it soon."

--
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

[jira] [Commented] (CLOUDSTACK-499) cloudmonkey CLI can't accept complex parameters

Posted by "Rohit Yadav (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLOUDSTACK-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498899#comment-13498899 ] 

Rohit Yadav commented on CLOUDSTACK-499:
----------------------------------------

So, I've changed how requests are made and args are calculated; in the new format maps can be passed as in http get requests for simplicity:

create networkoffering conservemode=true name=unique-name displaytext=description-text guestiptype=Isolated traffictype=GUEST serviceofferingid=9f873a59-2c4a-4c4f-9e1d-c27d919be584 supportedservices=Dhcp,Dns,UserData serviceproviderlist[0].service=Dhcp serviceproviderlist[0].provider=VirtualRouter serviceproviderlist[1].service=Dns serviceproviderlist[1].provider=VirtualRouter serviceproviderlist[2].service=UserData serviceproviderlist[2].provider=VirtualRouter

This is still ugly and may be improved. Pl. share any improvement suggestions?
                
> cloudmonkey CLI can't accept complex parameters
> -----------------------------------------------
>
>                 Key: CLOUDSTACK-499
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-499
>             Project: CloudStack
>          Issue Type: Bug
>          Components: Usage
>    Affects Versions: 4.1.0
>         Environment: Ubuntu 12.04, KVM hypervisor
>            Reporter: Dave Cahill
>            Assignee: Rohit Yadav
>              Labels: cloudmonkey
>             Fix For: 4.1.0
>
>
> When setting up a networkoffering, there's a serviceProviderList parameter which is a list of items, each of which has several key value pairs.
> According to Rohit (on dev list):
> "The way maps are handled in url are very different than how cloudmonkey parses and passing key,values.
> This actually needs to be fixed in Marvin, I've figured out a way but it may cause issues with marvin, will discuss with Prasanna and fix it soon."

--
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

[jira] [Commented] (CLOUDSTACK-499) cloudmonkey CLI can't accept complex parameters

Posted by "Prasanna Santhanam (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLOUDSTACK-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498673#comment-13498673 ] 

Prasanna Santhanam commented on CLOUDSTACK-499:
-----------------------------------------------

The serviceproviderlist is a difficult one to handle. Marvin doesn't do anything different. However for our tests network offering life cycle is simpified in the marvin.integration.lib:base.py

https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=blob;f=tools/marvin/marvin/integration/lib/base.py;h=5001dafb5ecf9c2f292af88079951cbc356a0276;hb=HEAD

1039 class NetworkOffering:
1040     """Manage network offerings cycle"""
1041 
1042     def __init__(self, items):
1043         self.__dict__.update(items)
1044 
1045     @classmethod
1046     def create(cls, apiclient, services, **kwargs):
1047         """Create network offering"""
1048 
1049         cmd = createNetworkOffering.createNetworkOfferingCmd()
1050         cmd.displaytext = "-".join([services["displaytext"], random_gen()])
1051         cmd.name = "-".join([services["name"], random_gen()])
1052         cmd.guestiptype = services["guestiptype"]
1053         cmd.supportedservices = services["supportedservices"]
1054         cmd.traffictype = services["traffictype"]
1055 
1056         cmd.serviceProviderList = []
1057         for service, provider in services["serviceProviderList"].items():
1058             cmd.serviceProviderList.append({
1059                                             'service': service,
1060                                             'provider': provider
1061                                            })
1062         if "servicecapabilitylist" in services:
1063             cmd.servicecapabilitylist = []
1064             for service, capability in services["servicecapabilitylist"].items():
1065                 for ctype, value in capability.items():
1066                     cmd.servicecapabilitylist.append({
1067                                             'service': service,
1068                                             'capabilitytype': ctype,
1069                                             'capabilityvalue': value
1070                                            })
1071         if "specifyVlan" in services:
1072             cmd.specifyVlan = services["specifyVlan"]
1073         if "specifyIpRanges" in services:
1074             cmd.specifyIpRanges = services["specifyIpRanges"]
1075 
1076         [setattr(cmd, k, v) for k, v in kwargs.items()]
1077 
1078         return NetworkOffering(apiclient.createNetworkOffering(cmd).__dict__)
1079 
1080     def delete(self, apiclient):
1081         """Delete network offering"""
1082         cmd = deleteNetworkOffering.deleteNetworkOfferingCmd()
1083         cmd.id = self.id
1084         apiclient.deleteNetworkOffering(cmd)
1085         return
1086 
1087     def update(self, apiclient, **kwargs):
1088         """Lists all available network offerings."""
1089 
1090         cmd = updateNetworkOffering.updateNetworkOfferingCmd()
1091         cmd.id = self.id
1092         [setattr(cmd, k, v) for k, v in kwargs.items()]
1093         return(apiclient.updateNetworkOffering(cmd))
1094 
1095     @classmethod
1096     def list(cls, apiclient, **kwargs):
1097         """Lists all available network offerings."""
1098 
1099         cmd = listNetworkOfferings.listNetworkOfferingsCmd()
1100         [setattr(cmd, k, v) for k, v in kwargs.items()]
1101         return(apiclient.listNetworkOfferings(cmd))

                
> cloudmonkey CLI can't accept complex parameters
> -----------------------------------------------
>
>                 Key: CLOUDSTACK-499
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-499
>             Project: CloudStack
>          Issue Type: Bug
>          Components: Usage
>    Affects Versions: 4.1.0
>         Environment: Ubuntu 12.04, KVM hypervisor
>            Reporter: Dave Cahill
>            Assignee: Rohit Yadav
>              Labels: cloudmonkey
>             Fix For: 4.1.0
>
>
> When setting up a networkoffering, there's a serviceProviderList parameter which is a list of items, each of which has several key value pairs.
> According to Rohit (on dev list):
> "The way maps are handled in url are very different than how cloudmonkey parses and passing key,values.
> This actually needs to be fixed in Marvin, I've figured out a way but it may cause issues with marvin, will discuss with Prasanna and fix it soon."

--
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

[jira] [Assigned] (CLOUDSTACK-499) cloudmonkey CLI can't accept complex parameters

Posted by "Rohit Yadav (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLOUDSTACK-499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rohit Yadav reassigned CLOUDSTACK-499:
--------------------------------------

    Assignee: Rohit Yadav
    
> cloudmonkey CLI can't accept complex parameters
> -----------------------------------------------
>
>                 Key: CLOUDSTACK-499
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-499
>             Project: CloudStack
>          Issue Type: Bug
>          Components: Usage
>    Affects Versions: 4.1.0
>         Environment: Ubuntu 12.04, KVM hypervisor
>            Reporter: Dave Cahill
>            Assignee: Rohit Yadav
>              Labels: cloudmonkey
>             Fix For: 4.1.0
>
>
> When setting up a networkoffering, there's a serviceProviderList parameter which is a list of items, each of which has several key value pairs.
> According to Rohit (on dev list):
> "The way maps are handled in url are very different than how cloudmonkey parses and passing key,values.
> This actually needs to be fixed in Marvin, I've figured out a way but it may cause issues with marvin, will discuss with Prasanna and fix it soon."

--
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

[jira] [Resolved] (CLOUDSTACK-499) cloudmonkey CLI can't accept complex parameters

Posted by "Rohit Yadav (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLOUDSTACK-499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rohit Yadav resolved CLOUDSTACK-499.
------------------------------------

    Resolution: Fixed

Fixed on master:
commit aa3ae45e6b4698b3b7fe5a9d097b73005c9b7a0b
Author: Rohit Yadav <bh...@apache.org>
Date:   Fri Nov 16 22:10:52 2012 +0530


                
> cloudmonkey CLI can't accept complex parameters
> -----------------------------------------------
>
>                 Key: CLOUDSTACK-499
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-499
>             Project: CloudStack
>          Issue Type: Bug
>          Components: Usage
>    Affects Versions: 4.1.0
>         Environment: Ubuntu 12.04, KVM hypervisor
>            Reporter: Dave Cahill
>            Assignee: Rohit Yadav
>              Labels: cloudmonkey
>             Fix For: 4.1.0
>
>
> When setting up a networkoffering, there's a serviceProviderList parameter which is a list of items, each of which has several key value pairs.
> According to Rohit (on dev list):
> "The way maps are handled in url are very different than how cloudmonkey parses and passing key,values.
> This actually needs to be fixed in Marvin, I've figured out a way but it may cause issues with marvin, will discuss with Prasanna and fix it soon."

--
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