This endpoint is used to create, modify, list and delete Machine Resolvers. Machine Resolvers fetch machine information from remote machine stores like a hosts file or an Active Directory.

The code of this module is tested in tests/test_api_machineresolver.py

14.1.1.11. Machine Resolver endpoints

POST /machineresolver/test

This function tests, if the given parameter will create a working machine resolver. The Machine Resolver Class itself verifies the functionality. This can also be network connectivity to a Machine Store.

Return:a json result with bool
GET /machineresolver/

returns a json list of all machine resolver.

Parameters:
  • type – Only return resolvers of type (like “hosts”...)
POST /machineresolver/(resolver)

This creates a new machine resolver or updates an existing one. A resolver is uniquely identified by its name.

If you update a resolver, you do not need to provide all parameters. Parameters you do not provide are left untouched. When updating a resolver you must not change the type! You do not need to specify the type, but if you specify a wrong type, it will produce an error.

Parameters:
  • resolver (basestring) – the name of the resolver.
  • type (string) – the type of the resolver. Valid types are... “hosts”
Return:

a json result with the value being the database id (>0)

Additional parameters depend on the resolver type.

hosts:
  • filename
DELETE /machineresolver/(resolver)

this function deletes an existing machine resolver

Parameters:
  • resolver – the name of the resolver to delete.
Return:

json with success or fail

GET /machineresolver/(resolver)

This function retrieves the definition of a single machine resolver.

Parameters:
  • resolver – the name of the resolver
Return:

a json result with the configuration of a specified resolver