Conductor Documentation

Netconf Plugin

cloudify-netconf-plugin

Studio Conductor plugin for serializing TOSCA node templates to netconf configuration.

Features

Full support for:

Partial support (only in use case of DSL validation):

Not supported:

For check generation:

Vyatta example is valid only for Brocade Vyatta Network OS 4.1 R2 and before run vyatta blueprint run as root on router:

Script name can be different and related to Brocade vRouter version.

Authentication

Each node template, has a netconf_auth property which stores your account credentials. Use an intrinsic function to assign these to the values of secrets](/working_with/manager/using-secrets/) in your manager.

  some-implementation:
    type: cloudify.netconf.nodes.xml_rpc
    properties:
      netconf_auth:
        user: { get_secret: device_user }
        password: { get_secret: device_password }
        ip: { get_secret: list_of_fallback_ips }
        key_content: { get_secret: private_key_content }
        port: { get_secret: device_port }

Note Types

cloudify.netconf.nodes.xml_rpc

Properties

Example

node_templates:
  some-implementation:
    type: cloudify.netconf.nodes.xml_rpc
    properties:
      netconf_auth:
        user: <user on device>
        password: <password on device, optional>
        ip: <ip for device or list of ip's if have failback ip's>
        key_content: <private key content>
        port: <port for device, optional by default 830>
        store_logs: <store all communication logs, optional by default false>
      metadata:
        dsdl:
          <optional dsdl generated by pyang>
        xmlns:
          _: <default namespace>
        capabilities:
          <list of capabilities, optional>
    interfaces:
      cloudify.interfaces.lifecycle:
        create: // can be create / configure / start / stop / delete
          inputs:
            lock:
              <list databased for lock, optional>
            back_database: <datebase to copy, optional>
            front_database: <database for copy, optional>
            strict_check: <ignore not critical errors in xml, optional>
            calls:
              - action: <action name for netconf>
                validate_xml: <validate by dsdl, optional by default true>
                payload:
                  <dict for put to payload>
                save_to: <field name for save to runtime properties, optional>
                deep_error_check: <look deeply for errors, optional by default false>

xml command list file part (template file)

<?xml version='1.0' encoding='UTF-8'?>
<rfc6020:rpc xmlns:rfc6020="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:xnm="http://xml.juniper.net/xnm/1.1/xnm" rfc6020:message-id="1001">
  <rpc-command-one/>
</rfc6020:rpc>]]>]]>

<?xml version='1.0' encoding='UTF-8'?>
<rfc6020:rpc xmlns:rfc6020="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:xnm="http://xml.juniper.net/xnm/1.1/xnm" rfc6020:message-id="1002">
  <rpc-command-two>
    {{ some_param_name }}
  </rpc-command-two>
</rfc6020:rpc>]]>]]>

Another Example

node_templates:
  some-implementation:
    type: cloudify.netconf.nodes.xml_rpc
    properties:
      netconf_auth:
        user: <user on device>
        password: <password on device, optional>
        ip: <ip for device>
        key_content: <private key content>
        port: <port for device, optional by default 830>
      metadata:
        xmlns:
          _: <default namespace>
        capabilities:
          <list of capabilities, optional>
    interfaces:
      cloudify.interfaces.lifecycle:
        create: // can be create / configure / start / stop / delete
          inputs:
            strict_check: <ignore not critical errors in xml, optional>
            deep_error_check: <look deeply for errors, optional by default false>
            template: <template file name>
            params: <dict params for template, optional>
              some_param_name: some param name

cloudify.netconf.translator.xml2netconf

Save a configuration to runtime properties.

Example

node_templates:
  some-implementation:
    type: cloudify.netconf.translator.xml2netconf
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          inputs:
            # list predifined namespaces, please put all namespases
            # from xmls, if you want reuse
            xmlns:
                some: some_ns
            # list xml for translate and reuse
            xmls:
              - save_to: some_name_in_runtime_properties
                raw: >
                    <nc_ns:rpc xmlns:nc_ns="urn:ietf:params:xml:ns:netconf:base:1.0">
                        <nc_ns:get-config>
                            <nc_ns:source>
                                <nc_ns:running/>
                            </nc_ns:source>
                        </nc_ns:get-config>
                    </nc_ns:rpc>

Note: As separator between commands must be used ]]>]]>_

tags name conversions logic:

examples of conversion

List

from:

{
    "b": {
        "a": [1, 2, 3],
        "c": 4
    }
}

to:

<b>
    <a>1</a>
    <a>2</a>
    <a>3</a>
    <c>4</c>
</b>

Dictionary

from:

{
    "b": {
        "a": 1,
        "c": 2
    }
}

to:

<b>
    <a>1</a>
    <c>2</c>
</b>

Attributes

from:

{
    "b": {
        "_@@a": 1,
        "_@@": 2
    }
}

to:

<b a=1>
    2
</b>

Text value for tag with attibutes

from:

{
    "b@a": {
        "_@c@a": 1,
        "_@@": 2,
        "_@@g": 3
    }
}

to:

<b:a c:a=1 b:g=3>
    2
</b:a>

Text value for raw insert

from:

{
    "a": {
        "_!_": "<g><a></a><c></c><d></d></g>"
    }
}

to:

<a>
    <g>
        <a/>
        <c/>
        <d/>
    </g>
</a>

Notes:

Versions:

Look to ChangeLog.