← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1303865] Re: mandatory fields are not enforced in launch stack

 

** Changed in: heat
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1303865

Title:
  mandatory fields are not enforced in launch stack

Status in Orchestration API (Heat):
  Fix Released
Status in OpenStack Dashboard (Horizon):
  Invalid

Bug description:
  - go to the Create Stack screen, enter the following valid Heat template:
  heat_template_version: 2013-05-23
  description: >
    A single stack with a keypair.

  parameters:
    key_name:
      type: string
      default: heat_key3
    key_save:
      type: string
      default: false

  resources:
    KeyPair:
      type: OS::Nova::KeyPair
      properties:
        name: { get_param: key_name }
        save_private_key: { get_param: key_save }

  outputs:
    PublicKey:
      value: { get_attr: [KeyPair, public_key] }
    PrivateKey:
      value: { get_attr: [KeyPair, private_key] }

   - delete one of the fields value (key_name or/and key_save)
  => you will get a message saying "Error: Stack creation failed."

  In horizon.log you will get:
  2014-04-07 14:49:23,055 7116 DEBUG heatclient.common.http 
  HTTP/1.1 400 Bad Request
  date: Mon, 07 Apr 2014 14:49:23 GMT
  content-length: 301
  content-type: application/json; charset=UTF-8

  {"explanation": "The server could not comply with the request since it
  is either malformed or otherwise incorrect.", "code": 400, "error":
  {"message": "Property error : KeyPair: save_private_key \"\" is not a
  valid boolean", "traceback": null, "type": "StackValidationFailed"},
  "title": "Bad Request"}

  if any/all of the 2 fields is mandatory, this should be enforced, both
  with a message, and with an asterisk, right next to the field.

To manage notifications about this bug go to:
https://bugs.launchpad.net/heat/+bug/1303865/+subscriptions


References