test server "zone" property is a map

Bug #1563631 reported by Anastasia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Go MAAS API Library
New
Undecided
Unassigned

Bug Description

Test server code in gomaasapi needs to be updated to align with MAAS.

Currently, "zone" property is still treated as field by gomaasi infrastructure and is searched for using matchField(node, "zone", zoneName) instead of getMap.

@see gomaasapi/testservice.go#findFreeNode

So instead of:

   if zoneName != "" && !matchField(node, "zone", zoneName) {
    continue
   }

There should be something like this:

   if zoneName != "" {
    zoneNameObj := maasify(server.client, map[string]interface{}{"name": zoneName, "description": "description"})
    node.GetMap()["zone"] = zoneNameObj
   }

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.