Create Reservation with multiple hypervisor properties using Rest API is failing

Bug #2020129 reported by Amar Rajeev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Blazar
New
Undecided
Unassigned

Bug Description

The lease-create request when given using API call, does not accept multiple properties
(Properties here means hypervisor_properties)
Below is the POST request given to create lease reservation

{
  "name": "test_lease_1",
  "reservations": [
    {
      "hypervisor_properties": "[
        "and",
        "[\">=\", \"$memory_mb\", \"1024\"]",
        "[\">=\", \"$vcpus\", \"2\"]",
        "[\"=\", \"$hypervisor_type\", \"phyp\"]",
        "[\"=\", \"$hypervisor_hostname\",\"89D0T\"]",
        "[\"=\", \"$hypervisor_version\",\"8\"]"
        ]",
      "max": 1,
      "min": 1,
      "resource_type": "physical:host",
      "resource_properties": ""
    }
  ],
  "start_date": "now",
  "end_date": "2023-05-21 08:00"
}

ERROR: blazar.manager.service Failed to create reservation for a lease. Rollback the lease and associated reservations: sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (1241, 'Operand should contain 1 column(s)')

Amar Rajeev (amar7raj)
summary: - Create Reservation with multiple hypervisor properties using API is
+ Create Reservation with multiple hypervisor properties using Rest API is
failing
Amar Rajeev (amar7raj)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.