# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. Namespaces: =: com.example.pivotal std: io.murano res: io.murano.resources Name: OpsManagerInstance Extends: res:LinuxInstance Methods: .init: Body: - $.customUserData: null prepareUserData: Body: - Return: data: $.customUserData format: RAW setInitData: Arguments: - initData: Contract: $.notNull() Body: - $.customUserData: str_replace: template: $initData params: wc_notify: get_attr: ['wait_handle', 'curl_cli'] # It is used to check if cloud-init finished the work on VM - $template: resources: wait_condition: type: 'OS::Heat::WaitCondition' properties: handle: {get_resource: wait_handle} count: 1 timeout: 600 wait_handle: type: 'OS::Heat::WaitConditionHandle' - $environment: $.find(std:Environment).require() - $environment.stack.updateTemplate($template)