| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b141b8e commit db9f825
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,7 +38,7 @@ public interface BackupManager extends BackupService, Configurable, PluggableSer | |||
| 38 | 38 | ConfigKey<Boolean> BackupFrameworkEnabled = new ConfigKey<>("Advanced", Boolean.class, | |
| 39 | 39 | "backup.framework.enabled", | |
| 40 | 40 | "false", | |
| 41 | - "Is backup and recovery framework enabled.", true, ConfigKey.Scope.Zone); | ||
| 41 | + "Is backup and recovery framework enabled.", false, ConfigKey.Scope.Zone); | ||
| 42 | 42 | ||
| 43 | 43 | ConfigKey<String> BackupProviderPlugin = new ConfigKey<>("Advanced", String.class, | |
| 44 | 44 | "backup.framework.provider.plugin", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -114,16 +114,21 @@ INSERT INTO `cloud`.`configuration` (category, instance, component, name, value) | |||
| 114 | 114 | VALUES ('Advanced', 'DEFAULT', 'management-server', | |
| 115 | 115 | 'ping.timeout', '2.0'); | |
| 116 | 116 | ||
| 117 | - -- Enable dynamic RBAC by default for fresh deployments | ||
| 117 | + -- Enable dynamic RBAC by default for developers | ||
| 118 | 118 | INSERT INTO `cloud`.`configuration` (category, instance, component, name, value) | |
| 119 | 119 | VALUES ('Advanced', 'DEFAULT', 'RoleService', | |
| 120 | 120 | 'dynamic.apichecker.enabled', 'true'); | |
| 121 | 121 | ||
| 122 | - -- Enable RootCA auth strictness for fresh deployments | ||
| 122 | + -- Enable RootCA auth strictness for developers | ||
| 123 | 123 | INSERT INTO `cloud`.`configuration` (category, instance, component, name, value) | |
| 124 | 124 | VALUES ('Advanced', 'DEFAULT', 'RootCAProvider', | |
| 125 | 125 | 'ca.plugin.root.auth.strictness', 'true'); | |
| 126 | 126 | ||
| 127 | + -- Enable B&R feature for developers | ||
| 128 | + INSERT INTO `cloud`.`configuration` (category, instance, component, name, value) | ||
| 129 | + VALUES ('Advanced', 'DEFAULT', 'BackupService', | ||
| 130 | + 'backup.framework.enabled', 'true'); | ||
| 131 | + | ||
| 127 | 132 | -- Add developer configuration entry; allows management server to be run as a user other than "cloud" | |
| 128 | 133 | INSERT INTO `cloud`.`configuration` (category, instance, component, name, value) | |
| 129 | 134 | VALUES ('Advanced', 'DEFAULT', 'management-server', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -736,7 +736,7 @@ public boolean configure(String name, Map<String, Object> params) throws Configu | |||
| 736 | 736 | } | |
| 737 | 737 | ||
| 738 | 738 | public boolean isDisabled(final Long zoneId) { | |
| 739 | - return !BackupFrameworkEnabled.valueIn(zoneId); | ||
| 739 | + return !(BackupFrameworkEnabled.value() && BackupFrameworkEnabled.valueIn(zoneId)); | ||
| 740 | 740 | } | |
| 741 | 741 | ||
| 742 | 742 | private void validateForZone(final Long zoneId) { | |
@@ -769,6 +769,10 @@ public BackupProvider getBackupProvider(final String name) { | |||
| 769 | 769 | @Override | |
| 770 | 770 | public List<Class<?>> getCommands() { | |
| 771 | 771 | final List<Class<?>> cmdList = new ArrayList<Class<?>>(); | |
| 772 | + if (!BackupFrameworkEnabled.value()) { | ||
| 773 | + return cmdList; | ||
| 774 | + } | ||
| 775 | + | ||
| 772 | 776 | // Offerings | |
| 773 | 777 | cmdList.add(ListBackupProvidersCmd.class); | |
| 774 | 778 | cmdList.add(ListBackupProviderOfferingsCmd.class); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,15 +41,9 @@ def setUpClass(cls): | |||
| 41 | 41 | assert False, "get_template() failed to return template with description %s" % cls.services["ostype"] | |
| 42 | 42 | cls.services["small"]["zoneid"] = cls.zone.id | |
| 43 | 43 | cls.services["small"]["template"] = cls.template.id | |
| 44 | - cls.account = Account.create(cls.api_client, cls.services["account"], domainid=cls.domain.id) | ||
| 45 | - cls.offering = ServiceOffering.create(cls.api_client,cls.services["service_offerings"]["small"]) | ||
| 46 | - cls.vm = VirtualMachine.create(cls.api_client, cls.services["small"], accountid=cls.account.name, | ||
| 47 | - domainid=cls.account.domainid, serviceofferingid=cls.offering.id, | ||
| 48 | - mode=cls.services["mode"]) | ||
| 49 | - cls._cleanup = [cls.offering, cls.account] | ||
| 44 | + cls._cleanup = [] | ||
| 50 | 45 | ||
| 51 | 46 | # Check backup configuration values, set them to enable the dummy provider | |
| 52 | - | ||
| 53 | 47 | backup_enabled_cfg = Configurations.list(cls.api_client, name='backup.framework.enabled', zoneid=cls.zone.id) | |
| 54 | 48 | backup_provider_cfg = Configurations.list(cls.api_client, name='backup.framework.provider.plugin', zoneid=cls.zone.id) | |
| 55 | 49 | cls.backup_enabled = backup_enabled_cfg[0].value | |
@@ -59,7 +53,17 @@ def setUpClass(cls): | |||
| 59 | 53 | Configurations.update(cls.api_client, 'backup.framework.enabled', value='true', zoneid=cls.zone.id) | |
| 60 | 54 | if cls.backup_provider != "dummy": | |
| 61 | 55 | Configurations.update(cls.api_client, 'backup.framework.provider.plugin', value='dummy', zoneid=cls.zone.id) | |
| 62 | - | ||
| 56 | + | ||
| 57 | + if cls.hypervisor.lower() != 'simulator': | ||
| 58 | + return | ||
| 59 | + | ||
| 60 | + cls.account = Account.create(cls.api_client, cls.services["account"], domainid=cls.domain.id) | ||
| 61 | + cls.offering = ServiceOffering.create(cls.api_client,cls.services["service_offerings"]["small"]) | ||
| 62 | + cls.vm = VirtualMachine.create(cls.api_client, cls.services["small"], accountid=cls.account.name, | ||
| 63 | + domainid=cls.account.domainid, serviceofferingid=cls.offering.id, | ||
| 64 | + mode=cls.services["mode"]) | ||
| 65 | + cls._cleanup = [cls.offering, cls.account] | ||
| 66 | + | ||
| 63 | 67 | # Import a dummy backup offering to use on tests | |
| 64 | 68 | ||
| 65 | 69 | cls.provider_offerings = BackupOffering.listExternal(cls.api_client, cls.zone.id) | |
@@ -85,6 +89,8 @@ def tearDownClass(cls): | |||
| 85 | 89 | def setUp(self): | |
| 86 | 90 | self.apiclient = self.testClient.getApiClient() | |
| 87 | 91 | self.dbclient = self.testClient.getDbConnection() | |
| 92 | + if self.hypervisor.lower() != 'simulator': | ||
| 93 | + raise self.skipTest("Skipping test cases which must only run for Simulator") | ||
| 88 | 94 | self.cleanup = [] | |
| 89 | 95 | ||
| 90 | 96 | def tearDown(self): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments