# Copyright 2018 Huawei Technologies Co., Ltd.
#
# 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.

open_cli_schema_version: 1.0
name: sdnc-create
description: Register SDNC into Onap
info:
  product: open-cli
  service: test
  type: cmd
  author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
parameters:
  - name: name
    description: Oclip SDNC name
    scope: short
    type: string
    short_option: n
    long_option: name
    is_optional: false
  - name: vendor
    description: Oclip SDNC vendor
    scope: short
    type: string
    short_option: e
    long_option: vendor
    is_optional: false
  - name: type
    description: Oclip SDNC type
    scope: short
    type: string
    short_option: y
    long_option: type
    is_optional: false
  - name: sdnc-version
    description: Oclip SDNC version
    scope: short
    type: string
    short_option: r
    long_option: sdnc-version
    is_optional: false
  - name: url
    description: Oclip SDNC base url
    scope: short
    type: url
    short_option: l
    long_option: url
    is_optional: false
  - name: description
    description: Oclip SDNC description
    scope: short
    type: string
    short_option: i
    long_option: description
    is_optional: false
  - name: username
    description: Oclip SDNC username
    scope: short
    type: string
    short_option: g
    long_option: username
    is_optional: false
  - name: password
    description: Oclip SDNC password
    scope: short
    type: string
    is_secured: true
    short_option: j
    long_option: password
    is_optional: false
  - name: product-name
    description: Oclip SDNC product-name
    scope: short
    type: string
    short_option: o
    long_option: product-name
    is_optional: false
  - name: protocol
    description: Oclip SDNC protocol
    scope: short
    type: string
    short_option: k
    long_option: protocol
    is_optional: false
results:
  direction: portrait
  attributes:
    - name: id
      description: Oclip SDNC ID
      scope: short
      type: string
    - name: name
      description: Oclip SDNC name
      scope: short
      type: string
    - name: vendor
      description: Oclip SDNC vendor
      scope: short
      type: string
    - name: type
      description: Oclip SDNC type
      scope: short
      type: string
    - name: version
      description: Oclip SDNC version
      scope: short
      type: string
    - name: url
      description: Oclip SDNC base url
      scope: short
      type: url
    - name: description
      description: Oclip SDNC description
      scope: short
      type: string
    - name: username
      description: Oclip SDNC username
      scope: short
      type: string
    - name: password
      description: Oclip SDNC password
      scope: short
      type: string
      is_secured: true
    - name: product-name
      description: Oclip SDNC product name
      scope: short
      type: string
    - name: protocol
      description: Oclip SDNC protocol
      scope: short
      type: string
    - name: create-time
      description: Oclip SDNC create-time
      scope: long
      type: string
http:
  request:
    headers:
      createOrUpdate: ${create-or-update1}
    body:
  success_codes:
  result_map:
    id: $b{$.sdnControllerId}
    name: $b{$.name}
    vendor: $b{$.vendor}
    type: $b{$.type}
    version: $b{$.version}
    url: $b{$.url}
    description: $b{$.description}
    username: $b{$.userName}
    password: $b{$.password}
    protocol: $b{$.protocol}
    product-name: $b{$.productName}
    create-time: $b{$.createTime}
  sample_response:
    body: