All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ine.api.model.4.5.2.source-code.A02-ChangesInV4.adoc Maven / Gradle / Ivy

There is a newer version: 4.6.0
Show newest version
[appendix]
== Changes in version 4 of the API

This section enumerates the backwards-compatibility breaking changes that
have been introduced in and since version 4 of the API.

=== Changes in API version 4.0 (succeeding version 3.6)

==== Removed YAML support

The support for YAML has been completely removed.

==== Renamed complex types

The following XML schema complex types have been renamed:

|====
| Version 3 | Version 4

| `API` | `Api`
| `CPU` | `Cpu`
| `CPUs` | `Cpus`
| `CdRom` | `Cdrom`
| `CdRoms` | `Cdroms`
| `DNS` | `Dns`
| `GuestNicConfiguration` | `NicConfiguration`
| `GuestNicsConfiguration` | `NicConfigurations`
| `HostNICStates` | `HostNicStates`
| `HostNIC` | `HostNic`
| `HostStorage` | `HostStorages`
| `IO` | `Io`
| `IP` | `Ip`
| `IPs` | `Ips`
| `KSM` | `Ksm`
| `MAC` | `Mac`
| `NIC` | `Nic`
| `PreviewVMs` | `PreviewVms`
| `QoS` | `Qos`
| `QoSs` | `Qoss`
| `RSDL` | `Rsdl`
| `SELinux` | `SeLinux`
| `SPM` | `Spm`
| `SSHPublicKey` | `SshPublicKey`
| `SSHPublicKeys` | `SshPublicKeys`
| `SSH` | `Ssh`
| `SkipIfSDActive` | `SkipIfSdActive`
| `Slaves` | `HostNics`
| `Storage` | `HostStorage`
| `SupportedVersions` | `Versions`
| `VCpuPin` | `VcpuPin`
| `VLAN` | `Vlan`
| `VM` | `Vm`
| `VMs` | `Vms`
| `VirtIO_SCSI` | `VirtioScsi`
| `WatchDog` | `Watchdog`
| `WatchDogs` | `Watchdogs`
|====

==== Replaced the `Status` type with enum types

Currently the status of different objects is reported using the `Status`
type, which contains a `state` string describing the status and another
`detail` string for additional details. For example, the status of a
virtual machine that is paused due to an IO error is currently reported
as follows:

[source,xml]
----

  ...
  
    paused
    eio
  
  ...

----

In version 4 of the API this `Status` type has been removed and replaced
by enum types. When the additional `detail` string is needed it has been
replaced with an additional `status_detail` attribute. So, for example,
the status of the same virtual machine will now be reported as follows:

[source,xml]
----

  ...
  paused
  eio
  ...

----

==== Remove the NIC `network` and `port_mirroring` properties

The NIC `network` and `port_mirroring` elements have been replaced by
the `vnic_profile` element, so when creating or updating a NIC instead
of specifying the network and port mirroring configuration, these are
previusly specified creating a vNIC profile:

....
POST /ovirt-engine/api/vnicprofiles
....

[source,xml]
----

  myprofile
  
  true

----

And then the NIC is created or referencing the existing vNIC profile:

....
PUT /ovirt-engine/api/vms/123/nics/456
....

[source,xml]
----

  

----

The old elements and their meaning were preserved for backwards
compatibility, but they have now been completely removed.

Note that the `network` element hasn't been removed from the XML schema
because it is still used by the `initialization` element, but it will be
completely ignored if provided when creating or updating a NIC.

==== Remove the NIC `active` property

The NIC `active` property was replaced by `plugged` some time ago. It
has been completely removed now.

==== Remove the disk `type` property

The `type` property of disks has been removed, but kept in the XML
schema and ignored. It has been completely removed now.

==== Remove the disk `size` property

The disk `size` property has been replaced by `provisioned_size` long
ago. It has been completely removed now.

==== Removed support for pinning a VM to a single host

Before version 3.6 the API had the possibility to pin a VM to a single
host, using the `placement_policy` element of the VM entity:

....
PUT /ovirt-engine/api/vms/123
....

[source,xml]
----

  
    
  

----

In version 3.6 this capability was enhanced to support multiple hosts,
and to do so a new `hosts` element was added:

....
PUT /ovirt-engine/api/vms/123
....

[source,xml]
----

  
    
      
      
      ...
    
  

----

To preserve backwards compatibility the single `host` element was
preserved. In 4.0 this has been removed, so applications will need to
use the `hosts` element even if when pinning to a single host.

==== Removed the `capabilities.permits` element

The list of permits is potentiall different for each cluster level, and
it has been added to the `version` element long ago, but it has been
kept into the `capabilities` element as well, just for backwards
compatibility.

In 4.0 it the `capabilities` service has been completely removed, and
replaced by the new `clusterlevels` service. To find the permits
supported by cluster level 4.0 a request like this should be used:

....
GET /ovirt-engine/api/clusterlevels/4.0
....

The result will be a document containing the information specific to
that cluster level, in particular the set of supported permits:

[source,xml]
----

  ...
  
    
      create_vm
      false
    
    ...
  

----

==== Removed the `storage_manager` element

The `storage_manager` element was replaced by the `spm` element some
time ago. The old one was kept for backwards compatibility, but it has
been completely removed now.

==== Removed the data center `storage_type` element

Data centers used to be associated to a specific storage type (NFS,
Fiber Channel, iSCSI, etc) but they have been changed some time so that
there are only two types: with local storage and with shared storage. A
new `local` element was introduced to indicate this, and the old
`storage_type` was element was preserved for backwards compatibility.
This old element has now been completely removed.

==== Remove the `timezone` element

The VM resource used to contain a `timezone` element to represent the
time zone. This element only allowed a string:

[source,xml]
----

  Europe/Madrid

----

This doesn't allow extension, and as a it was necessary to add the UTC
offset, it was replaced with a new structured `time_zone` element:

[source,xml]
----

  
    Europe/Madrid
    GMT+1
  

----

The old `timezone` element was preserved, but it has been completely
removed now.

==== Removed the `guest_info` element

The `guest_info` element was used to hold information gathered by the
guest agent, like the IP addresses and the fully qualified host name.
This information is also available in other places. For example, the IP
addresses are available within VM resource:

....
GET /ovirt-engine/api/vms/123
....

[source,xml]
----

  
    
      
    
    myvm.example.com
  

----

And also within the NIC resource, using the newer `reported_devices`
element:

....
GET /ovirt-engine/api/vms/{vm:id}/nics/{nic:id}
....

[source,xml]
----

  
    
      eth0
      
      
        
        
        
      
    
  

----

In addition this newer `reported_devices` element provides more complete
information, like multiple IP addresses, MAC addresses, etc.

To remove this duplication the `guest_info` element has been removed.

To support the fully qualified domain name a new `fqdn` element has been
added to the VM resource:

....
GET /ovirt-engine/api/vms/123
....

[source]
----

  myvm.example.com

----

This will contain the same information that `guest_info.fqdn` used to
contain.

==== Replaced CPU `id` attribute with `type` element

The `cpu` element used to have an `id` attribute that indicates the type
of CPU:

[source,xml]
----

  X86_64
  ...

----

This is in contradiction with the rest of the elements of the API model,
where the `id` attribute is used for opaque identifiers. This `id`
attribute has been replaced with a new `type` element:

[source,xml]
----

  Intel Nehalem Family
  X86_64

----

==== Use elements instead of attributes in CPU topology

In the past the CPU topology element used attributes for its properties:

[source,xml]
----

  
  ...

----

This is contrary to the common practice in the API. They have been
replaced by inner elements:

[source,xml]
----

  
    1
    1
    1
  
  ...

----

==== Use elements instead of attributes in VCPU pin

In the past the VCPU pin element used attributes for its properties:

[source,xml]
----

  

----

This is contrary to the common practice in the API. They have been
replaced by inner elements:

[source,xml]
----

  
    0
    0
  

----

==== Use elements instead of attributes in VCPU pin

In the past the `version` element used attributes for its properties:

[source,xml]
----

----

This is contrary to the common practice in the API. They have been
replaced by inner elements:

[source,xml]
----

  3
  5
  ...

----

==== Use elements instead of attributes in memory overcommit

In the past the `overcommit` element used attributes for its properties:

[source,xml]
----

  
  ...

----

This is contrary to the common practice in the API. They have been
replaced by inner elements:

[source,xml]
----

  
    100
  
  ...

----

==== Use elements instead of attributes in `console`

In the past the `console` element used attributes for its properties:

[source,xml]
----

----

This is contrary to the common practice in the API. They have been
replaced by inner elements:

[source,xml]
----

  true

----

==== Use elements instead of attributes in VIRTIO SCSI

In the past the VIRTIO ISCSI element used attributes for its properties:

[source,xml]
----

----

This is contrary to the common practice in the API. They have been
replaced by inner elements:

[source,xml]
----

  true

----

==== Use element instead of attribute for power management agent `type`

The power management `type` property was represented as an attribute:

[source,xml]
----

  myuser
  ...

----

This is contrary to the common practice in the API. It has been
replaced with an inner element:

[source,xml]
----

  apc
  myuser
  ...

----

==== Use elements instead of attributes in power management agent options

In the past the power management agent options element used attributes
for its properties:

[source,xml]
----

  
----

This is contrary to the common practice in the API. They have been
replaced with inner elements:

[source,xml]
----

  
  
  ...

----

==== Use elements instead of attributes in IP address:

In the past the IP address element used attributes for its properties:

[source,xml]
----

----

This is contrary to the common practice in the API. They have been
replaced with inner elements:

[source,xml]
----

  
192.168.122.1
255.255.255.0
---- ==== Use elements instead of attributes in MAC address: In the past the MAC address element used attributes for its properties: [source,xml] ---- ---- This is contrary to the common practice in the API. They have been replaced by inner elements: [source,xml] ----
66:f2:c5:5f:bb:8d
---- ==== Use elements instead of attributes in boot device: In the past the boot device element used attributes for its properties: [source,xml] ---- ---- This is contrary to the common practice in the API. They have been replaced by inner elements: [source,xml] ---- cdrom ---- ==== Use element instead of attribute for operating system `type` The operating system `type` property was represented as an attribute: [source,xml] ---- ... ---- This is contrary to the common practice in the API. It has been replaced with an inner element: [source,xml] ---- other ... ---- ==== Removed the `force` parameter from the request to retrieve a host The request to retrieve a host used to support a `force` matrix parameter to indicate that the data of the host should be refreshed (calling VDSM to reload host capabilities and devices) before retrieving it from the database: .... GET /ovirt-engine/api/hosts/123;force .... This `force` parameter has been superseded by the host `refresh` action, but kept for backwards compatibility. It has been completely removed now. Applications that require this functionality should perform two requests, first one to refresh the host: .... POST /ovirt-engine/api/hosts/123/refresh .... [source,xml] ---- ---- And then one to retrieve it, without the `force` parameter: .... GET /ovirt-engine/api/hosts/123 .... ==== Removed deprecated host power management configuration The host power management configuration used to be part of the host resource, using embedded configuration elements: [source,xml] ---- true
myaddress
myaddress
---- .... POST /ovirt-engine/api/templates .... [source,xml] ---- ---- This has been now removed, and replaced by a new `clone_permissions` query parameter: .... POST /ovirt-engine/api/vms?clone_permissions=true .... [source,xml] ----