This documentation supports the 21.3 (12.3) version of BMC Discovery.

model.publish


model.publish(node, auto_rels)

Takes a node of kind ModelDefinition and publishes it, creating a BusinessService, TechnicalService or BusinessApplicationInstance node. If the model is already published, updates the existing published node.


The ModelDefinition node must have the following attributes

  • key – a unique identifier.
  • name – the name of the service or application
  • kind – one of:
    • BusinessService
    • TechnicalService
    • BusinessApplicationInstance
  • type – usually "imported", to indicate an imported model; in rare cases could be "sam" or "static", to create a model that can be edited in the UI. 

The ModelDefinition node must have relationships with the specification Definition:DefinitionContainment:IncludedItem:<kind> to all nodes included in the model.

If auto_rels is false, the ModelDefinition node must also have relationships of specification Definition:DefinitionContainment:IncludedItem:<kind> to all of the relationships between nodes that are included in the model.

If auto_rels is true, relationships between the included nodes are automatically included in the model.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*