aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/services/opendaylight-api.yaml
blob: af85f4a3b2428a2ad9c51dc3b9ea78da88918ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.Strin
heat_template_version: pike

description: >
  OpenDaylight SDN Controller.

parameters:
  OpenDaylightPort:
    default: 8081
    description: Set opendaylight service port
    type: number
  OpenDaylightUsername:
    default: 'admin'
    description: The username for the opendaylight server.
    type: string
  OpenDaylightPassword:
    default: 'admin'
    type: string
    description: The password for the opendaylight server.
    hidden: true
  OpenDaylightConnectionProtocol:
    description: L7 protocol used for REST access
    type: string
    default: 'http'
  OpenDaylightEnableDHCP:
    description: Knob to enable/disable ODL DHCP Server
    type: boolean
    default: false
  OpenDaylightFeatures:
    description: List of features to install with ODL
    type: comma_delimited_list
    default: ["odl-netvirt-openstack","odl-netvirt-ui","odl-jolokia"]
  OpenDaylightApiVirtualIP:
    type: string
    default: ''
  EndpointMap:
    default: {}
    description: Mapping of service endpoint -> protocol. Typically set
                 via parameter_defaults in the resource registry.
    type: json
  ServiceNetMap:
    default: {}
    description: Mapping of service_name -> network name. Typically set
                 via parameter_defaults in the resource registry.  This
                 mapping overrides those in ServiceNetMapDefaults.
    type: json
  DefaultPasswords:
    default: {}
    type: json
  RoleName:
    default: ''
    description: Role name on which the service is applied
    type: string
  RoleParameters:
    default: {}
    description: Parameters specific to the role
    type: json

outputs:
  role_data:
    description: Role data for the OpenDaylight service.
    value:
      service_name: opendaylight_api
      config_settings:
        opendaylight::odl_rest_port: {get_param: OpenDaylightPort}
        opendaylight::username: {get_param: OpenDaylightUsername}
        opendaylight::password: {get_param: OpenDaylightPassword}
        opendaylight::extra_features: {get_param: OpenDaylightFeatures}
        opendaylight::enable_dhcp: {get_param: OpenDaylightEnableDHCP}
        opendaylight::odl_bind_ip: {get_param: [ServiceNetMap, OpendaylightApiNetwork]}
        opendaylight::nb_connection_protocol: {get_param: OpenDaylightConnectionProtocol}
        tripleo.opendaylight_api.firewall_rules:
              '137 opendaylight api':
                dport:
                  - {get_param: OpenDaylightPort}
                  - 6640
                  - 6653
                  - 2550
      step_config: |
        include tripleo::profile::base::neutron::opendaylight
      upgrade_tasks:
        - name: Check if opendaylight is deployed
          command: systemctl is-enabled opendaylight
          tags: common
          ignore_errors: True
          register: opendaylight_enabled
        - name: "PreUpgrade step0,validation: Check service opendaylight is running"
          shell: /usr/bin/systemctl show 'opendaylight' --property ActiveState | grep '\bactive\b'
          when: opendaylight_enabled.rc == 0
          tags: step0,validation
        - name: Stop opendaylight service
          tags: step1
          when: opendaylight_enabled.rc == 0
          service: name=opendaylight state=stopped
        - name: Removes ODL snapshots, data, journal directories
          file:
            state: absent
            path: /opt/opendaylight/{{item}}
          tags: step2
          with_items:
            - snapshots
            - data
            - journal