softlayer-java icon indicating copy to clipboard operation
softlayer-java copied to clipboard

Object-mask error when trying to get PublicVlans/PrivateVlans of Gateway

Open acamacho82 opened this issue 8 years ago • 0 comments

Following error is raised when using masks in getPublicVlan and getPrivateVlan methods of SoftLayer_Network_Gateway:

com.softlayer.api.ApiException$Internal: Property 'networkVlan' not valid for 'SoftLayer_Network_Vlan'.(code: SoftLayer_Exception_WebService_ObjectMask, status: 500)

I found this error by using following java code:

Gateway.Service gatewayService = Gateway.service(client, gatewayId);
 // Mask to get relational properties of a public vlan
gatewayService.withMask().publicVlan().networkVlan().vlanNumber();
Vlan vlan = gatewayService.getObject().getPublicVlan();

I tried by removing networkVlan() in the mask, but vlanNumber() or other properties cannot be called after publicVlan().

It is possible to get local properties without masks but it's a problem when trying to get relational properties like primaryRouter, networkSpace, etc.

This same issue happens with getPrivateVlan method.

Regards,

acamacho82 avatar Mar 20 '17 22:03 acamacho82