|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-API] issue with passing mtu field in "network record" while creating network using Perl(RPC::XML) xen-api
On 15/11/12 11:29, Rawat, Vishwanath wrote:
> Hi,
>
> I was trying to create a new network on a Xen server
> using RPC::XML calls.
>
> To create network, network_record need to be passed to
> RPC::XML::Client::simple_request. I didn’t want to manually create
> network record so I used a method call to get network_record and then
> used this record to create new network.
<big snip>
> So field accepted by "network.create" is ‘mTU’ and not ‘MTU’ which is I
> think wrong because field return by “network.get_record” is ‘MTU’.
That's odd. I've always called it with 'MTU' in all caps. Once again,
maybe you can dump the XML that's being generated by your RPC library to
see what's going on here.
> Problem 2.
>
> I was trying to create a VIF the way I created network.
> This is the code that I used
<another big snip>
>
> $VAR1 = {
> 'other_config' => {},
> 'network' => 'OpaqueRef:c76e3a4d-ceb0-c66f-707d-a6fdd2e06839',
> 'MAC_autogenerated' => 1,
> 'VM' => 'OpaqueRef:76120c51-60d2-0ef6-dda6-99fb12d9ce27',
> 'qos_algorithm_params' => {},
> 'uuid' => '9e72c72e-6d23-b300-9a1d-a54e2d6a50ab',
> 'qos_algorithm_type' => '',
> 'metrics' => 'OpaqueRef:a343e74c-12b3-dd73-9f3e-ac0113fd17a3',
> 'qos_supported_algorithms' => [],
> 'status_code' => '0',
> 'runtime_properties' => {},
> 'mTU' => 1500,
> 'MAC' => 'fe:13:d8:39:e5:6d',
> 'device' => '',
> 'MTU' => 1500,
> 'currently_attached' => 1,
> 'allowed_operations' => [
> 'attach',
> 'unplug'
> ],
> 'status_detail' => '',
> 'current_operations' => {}
> };
<snip>
>
> So I kept both mTU and MTU having the same value. Still didn’t work
>
>
> $VAR1 = {
> 'ErrorDescription' => [
> 'FIELD_TYPE_ERROR',
> 'mTU'
> ],
> 'Status' => 'Failure'
> };
>
You're getting an error here because the type of MTU is a string. I have
no idea why, but yes, it's a string, not an int. Same goes for the
device number.
Mike
_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |