softlayer / softlayer-ruby

http://softlayer.github.io/softlayer-ruby/
MIT License
54 stars 35 forks source link

Network_Service_Resource properties problem #65

Closed ju2wheels closed 9 years ago

ju2wheels commented 9 years ago

When working on Network_Service_Resource I am unable to include dependentResources and relatedResources as part of the default object mask although these are listed in the documentation. Not sure if this is a bug or just outdated doc.

net_serv = sl_client[:Account].object_mask("mask[id]").getNetworkStorage.map{|net_serv| SoftLayer::NetworkService.new(sl_client, sl_client[:Network_Storage].object_with_id(net_serv['id']).object_mask(SoftLayer::NetworkService.default_object_mask).getServiceResource) }
XMLRPC::FaultException: Property 'dependentResources' not valid for 'SoftLayer_Network_Service_Resource'.
    from /usr/lib/ruby/1.9.1/xmlrpc/client.rb:414:in `call'
    from /var/lib/gems/1.9.1/gems/softlayer_api-3.0.0/lib/softlayer/Service.rb:281:in `call_softlayer_api_with_params'
    from /var/lib/gems/1.9.1/gems/softlayer_api-3.0.0/lib/softlayer/APIParameterFilter.rb:194:in `method_missing'
    from (irb):118:in `block in irb_binding'
    from (irb):118:in `map'
    from (irb):118
    from /usr/bin/irb:12:in `<main>'

I get the same result for dependentResources and relatedResources properties but the rest work ok.

https://github.com/ju2wheels/softlayer-ruby/commit/c474ff42c25e47976766028556e76196b4e0b3b0

SLsthompson commented 9 years ago

I've sent a message asking about this but have not gotten a reply yet. I will re-ping.

SLsthompson commented 9 years ago

Internally these keys are marked as not-for-public-consumption so their presence in the SLDN documentation is... unexpected. Can you tell me what you are trying to accomplish by tapping those keys and I will see if there is a workaround?

ju2wheels commented 9 years ago

Was just adding them as they were there and wanted to model it fully when creating the base objs by adding them as dynamic attribs. If its not for public consumption then we are good, we can close.

Thanks,

SLsthompson commented 9 years ago

The Online documentation should be changed "soon" to reflect the true nature of these keys.

ju2wheels commented 9 years ago

Network_Storage_Credentials shows the same behavior when you try to use volumes as part of the object mask to Network_Storage.getCredentials .