Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fault reason is "Request syntactically incorrect" #20

Open
siddushar opened this issue Sep 18, 2024 · 0 comments
Open

Fault reason is "Request syntactically incorrect" #20

siddushar opened this issue Sep 18, 2024 · 0 comments

Comments

@siddushar
Copy link

Due to some SSO issue, i'm not able to authenticate to ovirt sdk using OvirtSDK4::Connection object.
mac version: 14.6.0 Sonoma

As a work-around solution , i tried to generate token and pass the token to the OvirtSDK4::Connection object. something like

connection = OvirtSDK4::Connection.new(
            url: host,
            username: @user,
            password: @pass,
            debug: true,
            ca_file:  '/Users/sh077503/Downloads/ca.crt',
            token: 'token here',
            log:      Logger.new('example.log')
          )

It worked for get calls but not working for post api calls.

I tried to create a vm and getting an error Fault reason is "Request syntactically incorrect." Fault detail is "For correct usage, see: https://engine-host/ovirt-engine/apidoc#services/vms/methods/add". HTTP response code is 400. (OvirtSDK4::Error)

Following code is not working.

vms_service = connection.system_service.vms_service
          vms_service.add(
  OvirtSDK4::Vm.new(
    name:    'testvm',
    cluster:  {
      name: 'LS1KVMGP02'
    },
    template: {
      name: 'Blank'
    }
  )
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant