Skip to content

Conversation

edwintorok
Copy link
Contributor

@edwintorok edwintorok commented May 25, 2018

Use same units for object default value and parameter default value, see commit message for explanation.
Tested by installing latest feature branch build, replacing xapi, and it has correctly updated the field in the database. The next time we build an SDK and rebuild XenCenter then XenCenter should get the correct value as well.

Use same units in the object and in the API.
The timeout set by XenCenter 20000s, which is wrong, it should've been
20s (which is what you get from the CLI).
XenCenter creates an object and then reads the field to find out the
default, because the SDK doesn't expose the defaults for parameters.

So we should really use the same units for API parameters and internal
object fields. Especially that this field is not used by XAPI at all,
it is only there so that the admin can inspect what values were used
to create the cluster.

Changing this field will not change the actual timeouts used by the
cluster, because the timeout values cannot be changed at runtime.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
@edwintorok edwintorok force-pushed the private/edvint/CA-290471 branch from 5e86264 to 0db0d49 Compare May 29, 2018 14:50
Copy link
Contributor

@minishrink minishrink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

; field ~qualifier:StaticRO ~lifecycle:[
Prototyped, rel_kolkata, "the unit is milliseconds";
Changed, rel_lima, "the unit is now seconds"
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could create a value for this specific lifecycle instead of passing it twice

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 20.77% when pulling 80f6e04 on edwintorok:private/edvint/CA-290471 into 4e5e5c3 on xapi-project:feature/REQ477/master.

@edwintorok edwintorok merged commit 78b5dd7 into xapi-project:feature/REQ477/master May 31, 2018
edwintorok added a commit that referenced this pull request Jun 7, 2018
* CA-290471: fix wrong token timeout in XenCenter

Use same units in the object and in the API.
The timeout set by XenCenter 20000s, which is wrong, it should've been
20s (which is what you get from the CLI).
XenCenter creates an object and then reads the field to find out the
default, because the SDK doesn't expose the defaults for parameters.

So we should really use the same units for API parameters and internal
object fields. Especially that this field is not used by XAPI at all,
it is only there so that the admin can inspect what values were used
to create the cluster.

Changing this field will not change the actual timeouts used by the
cluster, because the timeout values cannot be changed at runtime.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
rwdrich pushed a commit to rwdrich/xen-api that referenced this pull request Aug 23, 2018
* CA-290471: fix wrong token timeout in XenCenter

Use same units in the object and in the API.
The timeout set by XenCenter 20000s, which is wrong, it should've been
20s (which is what you get from the CLI).
XenCenter creates an object and then reads the field to find out the
default, because the SDK doesn't expose the defaults for parameters.

So we should really use the same units for API parameters and internal
object fields. Especially that this field is not used by XAPI at all,
it is only there so that the admin can inspect what values were used
to create the cluster.

Changing this field will not change the actual timeouts used by the
cluster, because the timeout values cannot be changed at runtime.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
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

Successfully merging this pull request may close these issues.

3 participants