You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Daan Hoogland <da...@gmail.com> on 2013/10/08 15:27:10 UTC

marvin create network offering incomplete?

H,

I am building an integration test with marvin and the following data:

            "network_offering": {
                "name": 'Test Network offering',
                "displaytext": 'Test Network offering',
                "guestiptype": 'Isolated',
                "supportedservices": 'Connectivity',
                "traffictype": 'GUEST',
                "availability": 'Optional',
                "specifyvlan": False,
                "specifyipranges": False,
                "serviceproviderlist": {
                    "Connectivity": "NiciraNVP"
                },
                "conservemode": False,
                "tags": [ "nicira-based" ]
            },
            "network": {
                "name": "Test Network",
                "displaytext": "Test Network",
                "tags": "nicira-based"
            },
 in the code I put:
        self.network_offering = NetworkOffering.create(
            self.apiclient,
            self.testdata["network_offering"]
        )
        # Enable Network offering
        self.network_offering.update(self.apiclient, state='Enabled')
        self.testdata["network"]["zoneid"] = self.zone.id
        self.testdata["network"]["networkoffering"] =
self.network_offering.id
        self.network = Network.create(
            self.apiclient,
            self.testdata["network"]
        )
The network doesn't get created:
 431, errorText:More than one physical networks exist in zone id=1 and no
tags are specified in order to make a choice

When inspecting indeed the tags are not set on the offering and neither is
conservemode.

Am I hunting a bug ar did I misconfigure my test?

Daan

Re: marvin create network offering incomplete?

Posted by Daan Hoogland <da...@gmail.com>.
H Prasanna,

I didn't get around to it and forgot about this.

   def createNiciraNetworkOffering(self, conn) :
      cno = createNetworkOffering.createNetworkOfferingCmd()
      cno.name = "NiciraNvpL2NoLB_" + str(random.randrange(1, 400, 1))
      cno.displaytext = "offering with Nicira NVP L2 without Lb"
      cno.traffictype = "GUEST"
      cno.specifyvlan = False
      cno.specifyipranges = False
      cno.availability = "Optional"
      cno.conservemode = False
      cno.guestiptype = "Isolated"
      cno.supportedservices = [ "UserData", "PortForwarding",
                                "Dhcp", "Vpn", "Dns", "SourceNat",
                                "Connectivity", "StaticNat", "Firewall" ]
      cno.serviceproviderlist = [ { "service": "UserData", "provider":
"VirtualRouter"},
                                  { "service": "PortForwarding",
"provider": "VirtualRouter"},
                                  { "service": "Dhcp", "provider":
"VirtualRouter"},
                                  { "service": "Vpn", "provider":
"VirtualRouter"},
                                  { "service": "Dns", "provider":
"VirtualRouter"},
                                  { "service": "SourceNat",
"provider": "VirtualRouter"},
                                  { "service": "StaticNat",
"provider": "VirtualRouter"},
                                  { "service": "Firewall", "provider":
"VirtualRouter"},
                                  { "service": "Connectivity",
"provider": "NiciraNVP"} ]
      cno.servicecapabilitylist = [ { "service": "SourceNat",
"capabilitytype": "SupportedSourceNatTypes", "capabilityvalue":
"peraccount" } ]
      cno.tags = [ "nicira-based" ]
      cno.maxconnections = 29
      cno.httpcloseenabled = False
      #cno.networkrate
      #cno.serviceofferingid

      resp = conn.marvin_request(cno)

      #
      # Enabled the network offering
      #
      uno = updateNetworkOffering.updateNetworkOfferingCmd()
      uno.id = resp.networkoffering.id
      uno.state = "Enabled"
      resp = conn.marvin_request(uno)
      return resp.networkoffering.id

I simplified the example in the bvt I want created. The point is that
I have two guest networks. One with vlan implementation and one nicira
based. I think that in the translation from the json like dictonary to
an actual api call something goes wrong.
As it seems the conserve mode is not translated either.

will keep you posted,
Daan

On Tue, Oct 8, 2013 at 6:52 PM, Daan Hoogland <da...@gmail.com> wrote:
> I've used marvin without the testdata construct fine. never the ui. I'll
> lookup the code once back at desk. Next afternoon
> Thanks Prassana (formerly known as Prussia, almost called Praag by the
> spellchecker )
>
> mobile biligual spell checker used
>
> Op 8 okt. 2013 16:01 schreef "Prasanna Santhanam" <ts...@apache.org>:
>
>> On Tue, Oct 08, 2013 at 03:27:10PM +0200, Daan Hoogland wrote:
>> > H,
>> >
>> > I am building an integration test with marvin and the following data:
>> >
>> >             "network_offering": {
>> >                 "name": 'Test Network offering',
>> >                 "displaytext": 'Test Network offering',
>> >                 "guestiptype": 'Isolated',
>> >                 "supportedservices": 'Connectivity',
>> >                 "traffictype": 'GUEST',
>> >                 "availability": 'Optional',
>> >                 "specifyvlan": False,
>> >                 "specifyipranges": False,
>> >                 "serviceproviderlist": {
>> >                     "Connectivity": "NiciraNVP"
>> >                 },
>> >                 "conservemode": False,
>> >                 "tags": [ "nicira-based" ]
>> >             },
>>
>> This looks fine.
>>
>> >             "network": {
>> >                 "name": "Test Network",
>> >                 "displaytext": "Test Network",
>> >                 "tags": "nicira-based"
>> >             },
>> >  in the code I put:
>> >         self.network_offering = NetworkOffering.create(
>> >             self.apiclient,
>> >             self.testdata["network_offering"]
>> >         )
>> >         # Enable Network offering
>> >         self.network_offering.update(self.apiclient, state='Enabled')
>> >         self.testdata["network"]["zoneid"] = self.zone.id
>> >         self.testdata["network"]["networkoffering"] =
>> > self.network_offering.id
>> >         self.network = Network.create(
>> >             self.apiclient,
>> >             self.testdata["network"]
>> >         )
>> > The network doesn't get created:
>> >  431, errorText:More than one physical networks exist in zone id=1 and
>> > no
>> > tags are specified in order to make a choice
>> >
>> > When inspecting indeed the tags are not set on the offering and neither
>> > is
>> > conservemode.
>>
>> Is that a resource-tag for the network offering? What is the API
>> request that is going to the management server from marvin? How does
>> it compare against what you sent through via the UI?
>>
>> >
>> > Am I hunting a bug ar did I misconfigure my test?
>>
>> I'm not sure. But it could just be that marvin created network
>> offering is not the same as the network offering created via the UI.
>>
>> >
>> > Daan
>>
>> --
>> Prasanna.,
>>
>> ------------------------
>> Powered by BigRock.com
>>
>

Re: marvin create network offering incomplete?

Posted by Daan Hoogland <da...@gmail.com>.
I've used marvin without the testdata construct fine. never the ui. I'll
lookup the code once back at desk. Next afternoon
Thanks Prassana (formerly known as Prussia, almost called Praag by the
spellchecker )

mobile biligual spell checker used
Op 8 okt. 2013 16:01 schreef "Prasanna Santhanam" <ts...@apache.org>:

> On Tue, Oct 08, 2013 at 03:27:10PM +0200, Daan Hoogland wrote:
> > H,
> >
> > I am building an integration test with marvin and the following data:
> >
> >             "network_offering": {
> >                 "name": 'Test Network offering',
> >                 "displaytext": 'Test Network offering',
> >                 "guestiptype": 'Isolated',
> >                 "supportedservices": 'Connectivity',
> >                 "traffictype": 'GUEST',
> >                 "availability": 'Optional',
> >                 "specifyvlan": False,
> >                 "specifyipranges": False,
> >                 "serviceproviderlist": {
> >                     "Connectivity": "NiciraNVP"
> >                 },
> >                 "conservemode": False,
> >                 "tags": [ "nicira-based" ]
> >             },
>
> This looks fine.
>
> >             "network": {
> >                 "name": "Test Network",
> >                 "displaytext": "Test Network",
> >                 "tags": "nicira-based"
> >             },
> >  in the code I put:
> >         self.network_offering = NetworkOffering.create(
> >             self.apiclient,
> >             self.testdata["network_offering"]
> >         )
> >         # Enable Network offering
> >         self.network_offering.update(self.apiclient, state='Enabled')
> >         self.testdata["network"]["zoneid"] = self.zone.id
> >         self.testdata["network"]["networkoffering"] =
> > self.network_offering.id
> >         self.network = Network.create(
> >             self.apiclient,
> >             self.testdata["network"]
> >         )
> > The network doesn't get created:
> >  431, errorText:More than one physical networks exist in zone id=1 and no
> > tags are specified in order to make a choice
> >
> > When inspecting indeed the tags are not set on the offering and neither
> is
> > conservemode.
>
> Is that a resource-tag for the network offering? What is the API
> request that is going to the management server from marvin? How does
> it compare against what you sent through via the UI?
>
> >
> > Am I hunting a bug ar did I misconfigure my test?
>
> I'm not sure. But it could just be that marvin created network
> offering is not the same as the network offering created via the UI.
>
> >
> > Daan
>
> --
> Prasanna.,
>
> ------------------------
> Powered by BigRock.com
>
>

Re: marvin create network offering incomplete?

Posted by Prasanna Santhanam <ts...@apache.org>.
On Tue, Oct 08, 2013 at 03:27:10PM +0200, Daan Hoogland wrote:
> H,
> 
> I am building an integration test with marvin and the following data:
> 
>             "network_offering": {
>                 "name": 'Test Network offering',
>                 "displaytext": 'Test Network offering',
>                 "guestiptype": 'Isolated',
>                 "supportedservices": 'Connectivity',
>                 "traffictype": 'GUEST',
>                 "availability": 'Optional',
>                 "specifyvlan": False,
>                 "specifyipranges": False,
>                 "serviceproviderlist": {
>                     "Connectivity": "NiciraNVP"
>                 },
>                 "conservemode": False,
>                 "tags": [ "nicira-based" ]
>             },

This looks fine.

>             "network": {
>                 "name": "Test Network",
>                 "displaytext": "Test Network",
>                 "tags": "nicira-based"
>             },
>  in the code I put:
>         self.network_offering = NetworkOffering.create(
>             self.apiclient,
>             self.testdata["network_offering"]
>         )
>         # Enable Network offering
>         self.network_offering.update(self.apiclient, state='Enabled')
>         self.testdata["network"]["zoneid"] = self.zone.id
>         self.testdata["network"]["networkoffering"] =
> self.network_offering.id
>         self.network = Network.create(
>             self.apiclient,
>             self.testdata["network"]
>         )
> The network doesn't get created:
>  431, errorText:More than one physical networks exist in zone id=1 and no
> tags are specified in order to make a choice
> 
> When inspecting indeed the tags are not set on the offering and neither is
> conservemode.

Is that a resource-tag for the network offering? What is the API
request that is going to the management server from marvin? How does
it compare against what you sent through via the UI?

> 
> Am I hunting a bug ar did I misconfigure my test?

I'm not sure. But it could just be that marvin created network
offering is not the same as the network offering created via the UI.

> 
> Daan

-- 
Prasanna.,

------------------------
Powered by BigRock.com