diff --git a/src/sunstone/etc/sunstone-views/kvm/admin.yaml b/src/sunstone/etc/sunstone-views/kvm/admin.yaml index c95cad583f..f42759bbdc 100644 --- a/src/sunstone/etc/sunstone-views/kvm/admin.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/admin.yaml @@ -81,6 +81,14 @@ features: # True to show the group datatable to instantiate VM show_as_gid_instantiate: true + + # If it is set to true, the host capacity will be checked. This will only affect oneadmin requests, + # regular users resize requests will always be enforced + resize_enforce: false + + deploy_enforce: false + + migrate_enforce: false tabs: dashboard-tab: # The following widgets can be used inside any of the '_per_row' settings diff --git a/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml b/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml index 4f53f97252..99b0125a62 100644 --- a/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml @@ -81,6 +81,14 @@ features: # True to show the group datatable to instantiate VM show_as_gid_instantiate: true + + # If it is set to true, the host capacity will be checked. This will only affect oneadmin requests, + # regular users resize requests will always be enforced + resize_enforce: false + + deploy_enforce: false + + migrate_enforce: false tabs: dashboard-tab: # The following widgets can be used inside any of the '_per_row' settings diff --git a/src/sunstone/etc/sunstone-views/kvm/user.yaml b/src/sunstone/etc/sunstone-views/kvm/user.yaml index 5aaab3afed..c93ecfc6ab 100644 --- a/src/sunstone/etc/sunstone-views/kvm/user.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/user.yaml @@ -75,6 +75,14 @@ features: # True to show the attributes info (VM & VRouters) show_attributes_info: true + + # If it is set to true, the host capacity will be checked. This will only affect oneadmin requests, + # regular users resize requests will always be enforced + resize_enforce: false + + deploy_enforce: false + + migrate_enforce: false tabs: dashboard-tab: # The following widgets can be used inside any of the '_per_row' settings diff --git a/src/sunstone/etc/sunstone-views/mixed/admin.yaml b/src/sunstone/etc/sunstone-views/mixed/admin.yaml index 97f3b170bf..53cfb0fbfd 100644 --- a/src/sunstone/etc/sunstone-views/mixed/admin.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/admin.yaml @@ -81,6 +81,14 @@ features: # True to show the group datatable to instantiate VM show_as_gid_instantiate: true + + # If it is set to true, the host capacity will be checked. This will only affect oneadmin requests, + # regular users resize requests will always be enforced + resize_enforce: false + + deploy_enforce: false + + migrate_enforce: false tabs: dashboard-tab: # The following widgets can be used inside any of the '_per_row' settings diff --git a/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml b/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml index 4f53f97252..99b0125a62 100644 --- a/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml @@ -81,6 +81,14 @@ features: # True to show the group datatable to instantiate VM show_as_gid_instantiate: true + + # If it is set to true, the host capacity will be checked. This will only affect oneadmin requests, + # regular users resize requests will always be enforced + resize_enforce: false + + deploy_enforce: false + + migrate_enforce: false tabs: dashboard-tab: # The following widgets can be used inside any of the '_per_row' settings diff --git a/src/sunstone/etc/sunstone-views/mixed/user.yaml b/src/sunstone/etc/sunstone-views/mixed/user.yaml index 5aaab3afed..c93ecfc6ab 100644 --- a/src/sunstone/etc/sunstone-views/mixed/user.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/user.yaml @@ -75,6 +75,14 @@ features: # True to show the attributes info (VM & VRouters) show_attributes_info: true + + # If it is set to true, the host capacity will be checked. This will only affect oneadmin requests, + # regular users resize requests will always be enforced + resize_enforce: false + + deploy_enforce: false + + migrate_enforce: false tabs: dashboard-tab: # The following widgets can be used inside any of the '_per_row' settings diff --git a/src/sunstone/etc/sunstone-views/vcenter/admin.yaml b/src/sunstone/etc/sunstone-views/vcenter/admin.yaml index 64f8bd1ceb..ce65beed62 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/admin.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/admin.yaml @@ -81,6 +81,14 @@ features: # True to show the group datatable to instantiate VM show_as_gid_instantiate: true + + # If it is set to true, the host capacity will be checked. This will only affect oneadmin requests, + # regular users resize requests will always be enforced + resize_enforce: false + + deploy_enforce: false + + migrate_enforce: false tabs: dashboard-tab: # The following widgets can be used inside any of the '_per_row' settings diff --git a/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml b/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml index 1ffe51a554..d516fc4f70 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml @@ -81,6 +81,14 @@ features: # True to show the group datatable to instantiate VM show_as_gid_instantiate: true + + # If it is set to true, the host capacity will be checked. This will only affect oneadmin requests, + # regular users resize requests will always be enforced + resize_enforce: false + + deploy_enforce: false + + migrate_enforce: false tabs: dashboard-tab: # The following widgets can be used inside any of the '_per_row' settings diff --git a/src/sunstone/etc/sunstone-views/vcenter/user.yaml b/src/sunstone/etc/sunstone-views/vcenter/user.yaml index 5aaab3afed..c93ecfc6ab 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/user.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/user.yaml @@ -75,6 +75,14 @@ features: # True to show the attributes info (VM & VRouters) show_attributes_info: true + + # If it is set to true, the host capacity will be checked. This will only affect oneadmin requests, + # regular users resize requests will always be enforced + resize_enforce: false + + deploy_enforce: false + + migrate_enforce: false tabs: dashboard-tab: # The following widgets can be used inside any of the '_per_row' settings diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy.js index 674f719919..b8f6804ff2 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy.js +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy.js @@ -26,6 +26,7 @@ define(function(require) { var HostsTable = require('tabs/hosts-tab/datatable'); var Notifier = require('utils/notifier'); var Tips = require('utils/tips'); + var Config = require('sunstone-config'); /* CONSTANTS @@ -81,6 +82,8 @@ define(function(require) { Tips.setup(context); + $("#enforce", context).attr("checked", Config.isFeatureEnabled("deploy_enforce")); + $('#' + DIALOG_ID + 'Form', context).submit(function() { var extra_info = {}; diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy/html.hbs b/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy/html.hbs index 31713cf662..d71bd37ed8 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy/html.hbs +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/deploy/html.hbs @@ -34,7 +34,7 @@