-
Notifications
You must be signed in to change notification settings - Fork 283
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
CA-208836 #2641
Conversation
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"; |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Don't try to enable a licensed feature by default.