Uploaded image for project: 'DeltaCloud'
  1. DeltaCloud
  2. DTACLOUD-160

Creating instance with name longer than 50 chars throws: ClientError: The request could not be understood by the server due to malformed syntax

    XMLWordPrintableJSON

Details

    Description

      Using deltacloud ruby client, create an instance with a name longer than 50 chars:

      DeltaCloud.new( API_NAME, API_PASSWORD, API_URL ) do |client|
      instance = client.create_instance( '359123e1-d343-40be-ae1d-df180cdf65ef',
      :hardware_profile=>'SERVER',
      :name=>"rlandyLaunchClientWithNameLongerThanSixtyCharactersTotestJiraOut")

      Client throws:

      1) launch test should allow creation of new instances
      Failure/Error: instance = client.create_instance( '359123e1-d343-40be-ae1d-df180cdf65ef',
      DeltaCloud::HTTPError::BadRequest:
      400

      DeltaCloud::HTTPError::ClientError: The request could not be understood by the server due to malformed syntax.

      1. ./lib/errors.rb:77:in `on'
      2. ./lib/errors.rb:105:in `client_error'
      3. ./lib/errors.rb:72:in `instance_eval'
      4. ./lib/errors.rb:72:in `initialize'
      5. ./lib/errors.rb:103:in `new'
      6. ./lib/errors.rb:103:in `client_error'
      7. ./lib/deltacloud.rb:359:in `response_error'
      8. ./lib/deltacloud.rb:391:in `request'
      9. ./lib/deltacloud.rb:390:in `send'
      10. ./lib/deltacloud.rb:390:in `request'
      11. ./lib/deltacloud.rb:316:in `method_missing'
      12. ./specs/launchclient_spec.rb:27
      13. ./lib/deltacloud.rb:82:in `initialize'
      14. ./lib/deltacloud.rb:41:in `new'
      15. ./lib/deltacloud.rb:41:in `new'
      16. ./specs/launchclient_spec.rb:26

      Finished in 0.07303 seconds
      1 example, 1 failure

      Failed examples:

      rspec ./specs/launchclient_spec.rb:25 # launch test should allow creation of new instances
      rake aborted!

      Looking at the server logs, "RuntimeError:Parameter name must be 50 characters or less" ... however this message is not passed to the client

      Attachments

        Activity

          People

            lutter David Lutterkort
            rlandy Ronelle Landy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: