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

CA-208836 #2641

Merged
merged 7 commits into from
Apr 26, 2016
Merged

CA-208836 #2641

merged 7 commits into from
Apr 26, 2016

Conversation

jonludlam
Copy link
Contributor

Don't try to enable a licensed feature by default.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
…untime

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
If, during VM.create, no value has been supplied for the 'has_vendor_device'
field, xapi will fill in 'true' iff the license allows it and the
pool.policy_no_vendor_device is false.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
The CLI will only request a vendor device on vm-install when the
recommendations of the template suggest it _and_ there is no
policy to disable it.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
…conditions

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
field ~qualifier:StaticRO ~lifecycle:[Published, rel_dundee, ""] ~doc_tags:[Windows] ~default_value:(Some (VBool true)) ~ty:Bool "has_vendor_device" "When an HVM guest starts, this controls the presence of the emulated C000 PCI device which triggers Windows Update to fetch or update PV drivers.";
field ~qualifier:StaticRO ~lifecycle:[Published, rel_dundee, ""] ~doc_tags:[Windows] ~default_value:(Some (VCustom (String.concat "\n" [
"(Rpc.Bool (";
"let pool = List.hd (Db_actions.DB_Action.Pool.get_all ~__context) in";
Copy link
Member

Choose a reason for hiding this comment

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

try .. with?

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
"(try Rpc.Bool (";
"let pool = List.hd (Db_actions.DB_Action.Pool.get_all ~__context) in";
"let restrictions = Db_actions.DB_Action.Pool.get_restrictions ~__context ~self:pool in ";
"let vendor_device_allowed = try List.assoc \"restrict_pci_device_for_auto_update\" restrictions = \"false\" with _ -> false in";
Copy link
Member

Choose a reason for hiding this comment

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

Actually, this would be better: Pool_features.is_enabled ~__context Features.PCI_device_for_auto_update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, that would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah actually no, I don't have access to the xapi modules, they're not in scope when this is compiled. I think it'll have to be left as it is.

@jonludlam jonludlam merged commit 4c25f55 into xapi-project:master Apr 26, 2016
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.

2 participants