Skip to content

Network_Firewall_AccessControlList service not respecting new object mask #48

@cbreden

Description

@cbreden

We are finally getting around to merging our own api wrapper with the 2.x+ gem here so we can start work on the new semantic models, but we're hitting a few bumps.

We've found at least one service that seems to ignore the new object mask string. Here's some test code that isolates this behavior along with the outputs.

## vvvvv Comment in/out gem version along with appropriate object mask

#gem 'softlayer_api', '=1.0.7'
#OBJECT_MASK = { 'id' => '', 'rules' => { 'id' => ''} }

#gem 'softlayer_api', '=2.1.1'
#OBJECT_MASK = "mask[ id, rules [ id ] ]"

## ^^^^^ Comment in/out gem version along with appropriate object mask 

require 'softlayer_api'
require 'pp'

user = "abc" 
api_key  = "xyzxyz"
firewall_id = 2132  # provide a valid firewall ID

service = SoftLayer::Service.new("SoftLayer_Network_Firewall_AccessControlList", :username => user, :api_key => api_key)
result = service.object_mask(OBJECT_MASK).object_with_id(firewall_id).getObject
pp result
with v1.0.7:
{"id"=>2132,
 "rules"=>
  [{"id"=>1273226},
   {"id"=>1273228},
   {"id"=>1273230},
   {"id"=>1273232},
......
with v2.1.1:
{"direction"=>"in", "firewallContextInterfaceId"=>4235, "id"=>2132}

We haven't found any way to get this mask to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions