Change Data Centre type from Local to Shared and vice versa

Hi all, How does one change a Data Centre type between Local/Shared through the SDK? Assume it's done through the systemService, but can't seem to find it. Cheers.

On Fri, Sep 6, 2019 at 12:27 PM <scott.fitzgerald@oracle.com> wrote:
Hi all,
How does one change a Data Centre type between Local/Shared through the SDK? Assume it's done through the systemService, but can't seem to find it.
This operation is not supported. Once you created a local/shared DC it cannot be changed. Nir

Hi Nir, My colleague found a solution: import static org.ovirt.engine.sdk4.builders.Builders.dataCenter; . . . systemService.dataCentersService().dataCenterService(datCenter.id()).update().dataCenter(dataCenter().local(true/false)).send(); Depending on the true/false the value can be changed between Shared and Local.

On Fri, Sep 6, 2019, 19:02 <scott.fitzgerald@oracle.com> wrote:
Hi Nir,
My colleague found a solution:
import static org.ovirt.engine.sdk4.builders.Builders.dataCenter; . . .
systemService.dataCentersService().dataCenterService(datCenter.id()).update().dataCenter(dataCenter().local(true/false)).send();
Depending on the true/false the value can be changed between Shared and Local.
It looks like a bug, don't depend on it. _______________________________________________
Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/G5QDTZI7PTPM32...

It can be changed: https://bugzilla.redhat.com/show_bug.cgi?id=1309212 On Fri, Sep 6, 2019 at 7:41 PM Nir Soffer <nsoffer@redhat.com> wrote:
On Fri, Sep 6, 2019, 19:02 <scott.fitzgerald@oracle.com> wrote:
Hi Nir,
My colleague found a solution:
import static org.ovirt.engine.sdk4.builders.Builders.dataCenter; . . .
systemService.dataCentersService().dataCenterService(datCenter.id()).update().dataCenter(dataCenter().local(true/false)).send();
Depending on the true/false the value can be changed between Shared and Local.
It looks like a bug, don't depend on it.
_______________________________________________
Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/G5QDTZI7PTPM32...
_______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/NVROR2BGVEWRQC...

On Wed, Sep 11, 2019 at 1:54 PM Fred Rolland <frolland@redhat.com> wrote:
It can be changed: https://bugzilla.redhat.com/show_bug.cgi?id=1309212
But if you have a local storage domain, it cannot be changed. Local domain are not compatible with shared domains - they do not use sanlock so there is no way to use such domain in a shared DC accessed from multiple hosts.
On Fri, Sep 6, 2019 at 7:41 PM Nir Soffer <nsoffer@redhat.com> wrote:
On Fri, Sep 6, 2019, 19:02 <scott.fitzgerald@oracle.com> wrote:
Hi Nir,
My colleague found a solution:
import static org.ovirt.engine.sdk4.builders.Builders.dataCenter; . . .
systemService.dataCentersService().dataCenterService(datCenter.id()).update().dataCenter(dataCenter().local(true/false)).send();
Depending on the true/false the value can be changed between Shared and Local.
It looks like a bug, don't depend on it.
_______________________________________________
Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/G5QDTZI7PTPM32...
_______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/NVROR2BGVEWRQC...

Hi Nir, I wasn't concerned with the Domains, I didn't have any attached. The test case was simply changing the status from shared to local or vice versa, within the constraints defined in the link shared by Fred.

On Wed, Sep 11, 2019 at 3:00 PM <scott.fitzgerald@oracle.com> wrote:
I wasn't concerned with the Domains, I didn't have any attached. The test case was simply changing the status from shared to local or vice versa, within the constraints defined in the link shared by Fred.
It should be fine then.
participants (3)
-
Fred Rolland
-
Nir Soffer
-
scott.fitzgerald@oracle.com