canonical / gomaasclient

Go MAAS client
Apache License 2.0
23 stars 28 forks source link

Running testing scripts is not supported #102

Closed gnuoy closed 1 month ago

gnuoy commented 2 months ago

Running testing script (such as ntp, memtester, stress-ng etc) is not supported directly. It can be done via the deprecated API client with something like:

    values := make(url.Values)
    values.Add("testing_scripts", strings.Join(testScripts, ","))

    machine := new(entity.Machine)
    machineAPI := APIClient.GetSubObject("machines").GetSubObject(machineData.SystemID)
    err := machineAPI.Post("test", values, func(data []byte) error {
        return json.Unmarshal(data, machine)
    })
github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.

skatsaounis commented 1 month ago

Hi @gnuoy . Thank you for opening the issue. I am marking it as duplicate of #96, which includes the op-test implementation