{"action":"created","issue":{"url":"https://api.github.com/repos/softlayer/softlayer-go/issues/90","repository_url":"https://api.github.com/repos/softlayer/softlayer-go","labels_url":"https://api.github.com/repos/softlayer/softlayer-go/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/softlayer/softlayer-go/issues/90/comments","events_url":"https://api.github.com/repos/softlayer/softlayer-go/issues/90/events","html_url":"https://github.com/softlayer/softlayer-go/issues/90","id":297673919,"number":90,"title":"Mask is being ignored when fetching hardware","user":{"login":"aaronmcohen","id":11925968,"avatar_url":"https://avatars0.githubusercontent.com/u/11925968?v=4","gravatar_id":"","url":"https://api.github.com/users/aaronmcohen","html_url":"https://github.com/aaronmcohen","followers_url":"https://api.github.com/users/aaronmcohen/followers","following_url":"https://api.github.com/users/aaronmcohen/following{/other_user}","gists_url":"https://api.github.com/users/aaronmcohen/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronmcohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronmcohen/subscriptions","organizations_url":"https://api.github.com/users/aaronmcohen/orgs","repos_url":"https://api.github.com/users/aaronmcohen/repos","events_url":"https://api.github.com/users/aaronmcohen/events{/privacy}","received_events_url":"https://api.github.com/users/aaronmcohen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-16T03:41:21Z","updated_at":"2018-02-19T23:57:42Z","closed_at":null,"author_association":"NONE","body":"I found that no matter what mask string I pass (datacenter, billingItemFlag, billingItem) the same fields were returned. \r\n\r\n### test code:\r\n```go\r\n\tmask := \"id;datacenter;hostname;domain;primaryBackendIpAddress\"\r\n\tslHardware, _ := services.GetAccountService(softlayerSession).Limit(1).Mask(mask).GetHardware()\r\n\tprintln(slHardware[0].Datacenter.Name)\r\n```\r\n\r\n### output:\r\n\r\n> runtime error: invalid memory address or nil pointer dereference\r\nruntime.call64\r\n\r\n### debug output:\r\n\r\n```\r\n2018/02/15 22:31:00 ->>>Request:\r\n2018/02/15 22:31:00 POST /xmlrpc/v3.1/SoftLayer_Account HTTP/1.1\r\nHost: api.softlayer.com\r\nUser-Agent: Go-http-client/1.1\r\nContent-Length: 1334\r\nContent-Type: text/xml\r\nAccept-Encoding: gzip\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?><methodCall><methodName>getHardware</methodName><params><param><value><struct><member><name>headers</name><value><struct><member><name>User-Agent</name><value><string>softlayer-go/v0.1.0-alpha (go1.9.2;amd64;darwin)</string></value></member><member><name>authenticate</name><value><struct><member><name>apiKey</name><value><string>REMOVED</string></value></member><member><name>username</name><value><string>REMOVED</string></value></member></struct></value></member><member><name>SoftLayer_AccountObjectMask</name><value><struct><member><name>mask</name><value><struct><member><name>datacenter</name><value><array><data></data></array></value></member><member><name>hostname</name><value><array><data></data></array></value></member><member><name>domain</name><value><array><data></data></array></value></member><member><name>primaryBackendIpAddress</name><value><array><data></data></array></value></member></struct></value></member></struct></value></member><member><name>resultLimit</name><value><struct><member><name>limit</name><value><int>1</int></value></member><member><name>offset</name><value><int>0</int></value></member></struct></value></member></struct></value></member></struct></value></param></params></methodCall>\r\n2018/02/15 22:31:01 \r\n\r\n<<<-Response:\r\n2018/02/15 22:31:01 HTTP/1.1 200 OK\r\nConnection: close\r\nCache-Control: private\r\nContent-Type: text/xml\r\nDate: Fri, 16 Feb 2018 03:31:01 GMT\r\nNtcoent-Length: 3031\r\nServer: Apache\r\nSoftlayer-Total-Items: 392\r\nVary: Accept-Encoding\r\nX-Frame-Options: SAMEORIGIN\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<params>\r\n<param>\r\n <value>\r\n  <struct>\r\n   <member>\r\n    <name>accountId</name>\r\n    <value>\r\n     <int>REMOVED</int>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>bareMetalInstanceFlag</name>\r\n    <value>\r\n     <int>0</int>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>domain</name>\r\n    <value>\r\n     <string>REMOVED</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>fullyQualifiedDomainName</name>\r\n    <value>\r\n     <string>REMOVED</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>hardwareStatusId</name>\r\n    <value>\r\n     <int>5</int>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>hostname</name>\r\n    <value>\r\n     <string>REMOVED</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>id</name>\r\n    <value>\r\n     <int>708533</int>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>manufacturerSerialNumber</name>\r\n    <value>\r\n     <string>1REMOVED</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>notes</name>\r\n    <value>\r\n     <string/>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>provisionDate</name>\r\n    <value>\r\n     <string>2016-10-11T13:24:34-07:00</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>serialNumber</name>\r\n    <value>\r\n     <string>REMOVED</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>serviceProviderId</name>\r\n    <value>\r\n     <int>1</int>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>serviceProviderResourceId</name>\r\n    <value>\r\n     <string/>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>globalIdentifier</name>\r\n    <value>\r\n     <string>REMOVED</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>networkManagementIpAddress</name>\r\n    <value>\r\n     <string>REMOVED</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>primaryBackendIpAddress</name>\r\n    <value>\r\n     <string>1REMOVED</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>primaryIpAddress</name>\r\n    <value>\r\n     <string>1REMOVED</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>privateIpAddress</name>\r\n    <value>\r\n     <string>1REMOVED</string>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>hardwareFunction</name>\r\n    <value>\r\n     <struct>\r\n      <member>\r\n       <name>code</name>\r\n       <value>\r\n        <string>WEBSVR</string>\r\n       </value>\r\n      </member>\r\n      <member>\r\n       <name>description</name>\r\n       <value>\r\n        <string>Web Server</string>\r\n       </value>\r\n      </member>\r\n      <member>\r\n       <name>id</name>\r\n       <value>\r\n        <int>3</int>\r\n       </value>\r\n      </member>\r\n     </struct>\r\n    </value>\r\n   </member>\r\n   <member>\r\n    <name>hardwareStatus</name>\r\n    <value>\r\n     <struct>\r\n      <member>\r\n       <name>id</name>\r\n       <value>\r\n        <int>5</int>\r\n       </value>\r\n      </member>\r\n      <member>\r\n       <name>status</name>\r\n       <value>\r\n        <string>ACTIVE</string>\r\n       </value>\r\n      </member>\r\n     </struct>\r\n    </value>\r\n   </member>\r\n  </struct>\r\n </value>\r\n</param>\r\n</params>\r\n```"},"comment":{"url":"https://api.github.com/repos/softlayer/softlayer-go/issues/comments/366830025","html_url":"https://github.com/softlayer/softlayer-go/issues/90#issuecomment-366830025","issue_url":"https://api.github.com/repos/softlayer/softlayer-go/issues/90","id":366830025,"user":{"login":"acamacho82","id":6937170,"avatar_url":"https://avatars2.githubusercontent.com/u/6937170?v=4","gravatar_id":"","url":"https://api.github.com/users/acamacho82","html_url":"https://github.com/acamacho82","followers_url":"https://api.github.com/users/acamacho82/followers","following_url":"https://api.github.com/users/acamacho82/following{/other_user}","gists_url":"https://api.github.com/users/acamacho82/gists{/gist_id}","starred_url":"https://api.github.com/users/acamacho82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acamacho82/subscriptions","organizations_url":"https://api.github.com/users/acamacho82/orgs","repos_url":"https://api.github.com/users/acamacho82/repos","events_url":"https://api.github.com/users/acamacho82/events{/privacy}","received_events_url":"https://api.github.com/users/acamacho82/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T23:57:42Z","updated_at":"2018-02-19T23:57:42Z","author_association":"NONE","body":"@renier is right. The ObjectMask should reference to the same service. So SoftLayer_AccountObjectMask is correct when calling to getHardware().\r\n\r\nAs renier mentions it could be an issue in the softlayer api. Meanwhile I suggest to use the default REST endpoint  `https://api.softlayer.com/rest/v3.`\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"acamacho82"}}