Skip to content

Cannot replace or remove cluster custom scheduling policy properties #41

@HyeongSeop-Kim

Description

@HyeongSeop-Kim

Environment:
oVirt Engine Version: ovirt-engine-4.5.3.8-2.el8ev
oVirt Java SDK Version: org.ovirt.engine.api:sdk:4.5.1
Java Version: 21

When using the oVirt Java SDK to update a cluster's customSchedulingPolicyProperties, I encounter the following problem:

Example Code:

Cluster cluster = cluster()
    .customSchedulingPolicyProperties(properties)
    .build();

connection.systemService()
    .dataCentersService()
    .dataCenterService(dataCenterId)
    .clustersService()
    .clusterService(clusterId)
    .update()
    .cluster(cluster)
    .send();

Expected Result:
When passing a new properties list, the existing customSchedulingPolicyProperties in the cluster should be completely replaced by the new list.
If an empty list is passed as the properties, the existing customSchedulingPolicyProperties should be removed entirely, leaving only the schedulingPolicy applied.

Actual Result:
When passing a new list of properties, the existing customSchedulingPolicyProperties are not replaced. Instead, the new properties are added or updated, leaving the old properties intact.
When passing an empty list, the existing customSchedulingPolicyProperties are not removed, and they remain unchanged.

Questions:
Is this behavior intentional? If yes, how can I remove existing customSchedulingPolicyProperties completely using the oVirt Java SDK?
If this is not intentional, is it possible to address this issue or provide a workaround to achieve the expected behavior?
Please confirm whether this is a bug or an intended design choice. If additional information is needed, I am happy to provide more details or clarification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions