fanatic / go-infoblox

Golang Infoblox WAPI Library (Deprecated)
16 stars 26 forks source link

Add function to allow making new Resource objects explicitly #49

Closed vitanovs closed 5 years ago

vitanovs commented 5 years ago

The function featured in this Pull request will allow users of the library to define their own resource objects very easy. The main reason why we need this function is that we want to query the Infoblox instance schema ( https://1.2.3.4/wapi/v1.0/?_schema ) for that reason we need a resource with wapiObject="", but adding a dedicated Resource object just for this does not look good. The result that we would like to have is ( sample from https://ipam.illinois.edu/wapidoc/index.html#objects ) :

{
  "requested_version": "1.0",
  "supported_objects": [
            "ipv4address",
            "ipv6address",
            "ipv6network",
            "ipv6networkcontainer",
            "ipv6range",
            "macfilteraddress",
            "network"
  ],
  "supported_versions": ["1.0", "1.1", "1.2", "1.2.1"]
}