google.cloud.forseti.services.model.modeller module

Modeller API.

class Modeller(config)[source]

Bases: object

Implements the Modeller API.

create_model(source, name, inventory_index_id, background)[source]

Creates a model from the import source.

Parameters:
  • source (str) – The source of the model, “inventory” or “empty”
  • name (str) – Model name to instantiate.
  • inventory_index_id (int64) – Inventory id to import from
  • background (bool) – Whether to run the model creation in background
Returns:

the created data model

Return type:

object

delete_model(model_name)[source]

Deletes a model.

Parameters:model_name (str) – name of the model to be deleted
get_model(model)[source]

Get details of a model by name or handle.

Parameters:model (str) – name or handle of the model to query
Returns:db Model instance dao
Return type:Model
list_model()[source]

Lists all models.

Returns:list of Models in dao
Return type:list