deb-murano/doc/source/murano_pl/system_classes.rst
Ekaterina Chernova 8d6de8f471 Fix documentation errors and warnings
Change-Id: I198aeee9c35697fbebf6e3fdc43a779d40e5ab0c
2014-11-14 15:49:09 +04:00

4.9 KiB

Murano PL System Class Definitions

Murano program language has system classes, which make deploying process as convenient as it could be. System classes are used in user class definitions for a custom applications. This article is going to help users to operate with Murano PL classes without any issues. All classes are located in the murano-engine component and don`t require particular import.

  • io.murano.system.Resources
  • io.murano.system.Agent
  • io.murano.system.AgentListener
  • io.murano.system.HeatStack
  • io.murano.system.InstanceNotifier
  • io.murano.system.NetworkExplorer
  • io.murano.system.StatusReporter

io.murano.system.Resources

Used to provide API to all files, located in the Resource directory of application package. Those Resources usually used in an application deployment and needed to be specified in a workflow definition. Available methods:

  • yaml return resource file in yaml format
  • string return resource file as string
  • json return resource in json format

io.murano.system.Agent

Defines Murano Agent and ways of interacting with it. Available methods:

  • call(template, resources) - send an execution plan template and resource object, and wait for an operation to complete
  • send(template, resources) - send execution plan template and resource class instance and continue execution without waiting for an end of the execution
  • callRaw(plan) - send ready-to-perform murano agent execution plan and wait for an operation to complete
  • sendRaw(plan) - send ready-to-perform murano agent execution plan and continue workflow execution
  • queueName() - returns name of the queue with which Agent is working

io.murano.system.AgentListener

Used for monitoring Murano Agent.

  • start() - start to monitor Murano Agent activity
  • stop() - stop to monitor Murano Agent activity
  • subscribe(message_id, event) - subscribe to the specified Agent event
  • queueName() - returns name of the queue with which Agent is working

io.murano.system.HeatStack

Manage Heat stack operations.

  • current() - returns current heat template
  • parameters() - returns heat template parameters
  • reload() - reload heat template
  • setTemplate(template) - load heat template
  • updateTemplate(template) - update current template with the specified part of heat stack
  • output() - result of heat template execution
  • push() - commit changes (requires after setTemplate and updateTemplate operations)
  • delete() - delete current heat stack

io.murano.system.InstanceNotifier

Monitor application and instance statistics to provide billing feature.

  • trackApplication(instance, title, unitCount) - start to monitor an application activity; title, unitCount - are optional
  • untrackApplication(instance) - stop to monitor an application activity
  • trackCloudInstance(instance) - start to monitor an instance activity
  • untrackCloudInstance(instance) - stop to monitor an instance activity

io.murano.system.NetworkExplorer

Determines and configures network topology.

  • getDefaultRouter() - determine default router
  • getAvailableCidr(routerId, netId) - searching for non-allocated CIDR
  • getDefaultDns() - get dns from config file
  • getExternalNetworkIdForRouter(routerId) - Check for router connected to the external network
  • getExternalNetworkIdForNetwork(networkId) - For each router this network is connected to check whether the router has external_gateway set

io.murano.system.StatusReporter

Provides feedback feature. To follow the deployment process in the UI, all status changes should be included in the application configuration.

  • report(instance, msg) - Send message about an application deployment process
  • report_error(instance, msg) - Report an error during an application deployment process