Could somebody explain this please?

On Thu, Jun 21, 2018 at 7:41 AM, Hari Prasanth Loganathan <hariprasanth.l@msystechnologies.com> wrote:
Hi Ondra / Ori,

https://github.com/oVirt/ovirt-engine/search?q=FAIL_ON_UNKNOWN_PROPERTIES%2C+false%29%3B&unscoped_q=FAIL_ON_UNKNOWN_PROPERTIES%2C+false%29%3B

Check the above link, As per the code it is always set as false, So is there a way in payload / headers in client API / server configuration in oVirt engine which can ignore the extra payload parameters?

Any help / workaround is much appreciated.

Thanks, Greg for pointing the right ppl.

Thanks,
Hari

On Thu, Jun 21, 2018 at 1:35 AM, Greg Sheremeta <gshereme@redhat.com> wrote:
+Ondra and Ori

On Wed, Jun 20, 2018 at 1:07 PM Hari Prasanth Loganathan <hariprasanth.l@msystechnologies.com> wrote:
Guys any update on this?  if you have any clarification let me know please.

Thanks 

On Wed, 20 Jun 2018 at 5:41 PM, Hari Prasanth Loganathan <hariprasanth.l@msystechnologies.com> wrote:
Hi Team,



formattedMapper.configure(Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);

As a default, this flag is set as false, then How I get this error? Any idea?


Thanks,
Hari



On Wed, Jun 20, 2018 at 5:21 PM, Hari Prasanth Loganathan <hariprasanth.l@msystechnologies.com> wrote:
Hi all,

To clarify my payload is like below,

Expected :

{
   "alias": "testdisk",
   "shareable": false,
   "storage_type": "cinder",
   "openstack_volume_type": {
        "name": "ceph"
    },
   "description": "",
   "storage_domains": {
         "storage_domain": [{
            "name": "cinder_newone"
         }]
    },
   "provisioned_size": 1073741824,
     "interface": "virtio",
     "format": "cow"
}

I sent :

{
   "alias": "testdisk",
   "shareable": false,
   "storage_type": "cinder",
   "openstack_volume_type": {
        "name": "ceph"
    },
   "description": "",
   "storage_domains": {
         "storage_domain": [{
            "name": "cinder_newone"
         }]
    },
   "provisioned_size": 1073741824,
     "interface": "virtio",
     "format": "cow",
     "test" : "value"
}


Is there a way to ignore the test field? Please let me know any way / work around.


Any help is much appreciated.

Thanks,
Hari


On Wed, Jun 20, 2018 at 3:09 PM, Hari Prasanth Loganathan <hariprasanth.l@msystechnologies.com> wrote:
Hi Team,

I want to attach the disk using the oVIrt rest API, I use the version 4.2 and completed my script.
But when I downgrade my oVirt to lower version 4.1, I get the following error.

detail: 'For correct usage, see: https://X.X.99.84/ovirt-engine/api/v4/model#services/disk-attachments/methods/add',\n  reason: 'Request syntactically incorrect.',\n  error: 'For correct usage, see: https://X.X.99.84/ovirt-engine/api/v4/model#services/disk-attachments/methods/add',\n 

Reason: I added an extra parameter called 'isSharable' which is not expected in this API.


So Is there a way to Ignore the extra parameters sent for oVirt API?

Example :

Expected :

{
 "a"  : "1"
}

I sent :

{
  "a" : "1",
  "b" : "2"
}

My expectation is, Ignore the "b" and the API should work, Is there a flag in oVirt API which ignores the extra parameters? 

Thanks,
Hari


_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-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/users@ovirt.org/message/Q3S2KU4PXZ7P2ZBLAYM7CYAK2S4NUJD5/


--

GREG SHEREMETA

SENIOR SOFTWARE ENGINEER - TEAM LEAD - RHV UX

Red Hat NA

gshereme@redhat.com    IRC: gshereme