Skip to content

Changes in inputs produce an error if redeployed #248

@alexmaslenn

Description

@alexmaslenn

Description

After a service template with inputs is deployed, a removing an input can cause an error.

Steps

Consider having the following simple service template service.yaml file with inputs section:

tosca_definitions_version: tosca_simple_yaml_1_3

topology_template:
  inputs:
    input1:
      type: string
    input2:
      type: string

  node_templates:
    my-workstation:
      type: tosca.nodes.Compute
      attributes:
        private_address: { get_input: input1 }
        public_address:  { get_input: input2 }

with inputs.yaml file being

input1: localhost
input2: localhost

After we successfully execute the deployment with opera deploy -i input.yaml service.yaml we make the following changes in the files, removing input2:

tosca_definitions_version: tosca_simple_yaml_1_3

topology_template:
  inputs:
    input1:
      type: string

  node_templates:
    my-workstation:
      type: tosca.nodes.Compute
      attributes:
        private_address: { get_input: input1 }
input1: localhost

Current behaviour

Execution of the command opera deploy -i input.yaml service.yaml -c returns the following error:

opera.error.DataError: Undeclared inputs: input2

This happens because if instances directory is present in .opera file storage, inputs are read from the storage, not from the file provided in -i arg.

Expected behaviour

No error is returned and deployment is successful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TOSCASomething that considers TOSCA standardbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions