|
1 | | -from oslo_config import cfg |
| 1 | +from jumpgate.common import config |
2 | 2 |
|
3 | 3 |
|
4 | 4 | class OSQuotaSetsV2(object): |
5 | 5 | def on_get(self, req, resp, tenant_id, account_id=None): |
6 | 6 | qs = { |
7 | | - "cores": cfg.CONF['compute']['default_cores'], |
8 | | - "floating_ips": cfg.CONF['compute']['default_floating_ips'], |
| 7 | + "cores": config.PARSER.get("compute",'default_cores'), |
| 8 | + "floating_ips": config.PARSER.get("compute",'default_floating_ips'), |
9 | 9 | "id": tenant_id, |
10 | 10 | "injected_file_content_bytes": |
11 | | - cfg.CONF['compute']['default_injected_file_content_bytes'], |
| 11 | + config.PARSER.get("compute",'default_injected_file_content_bytes'), |
12 | 12 | "injected_file_path_bytes": |
13 | | - cfg.CONF['compute']['default_injected_file_path_bytes'], |
14 | | - "injected_files": cfg.CONF['compute']['default_injected_files'], |
15 | | - "instances": cfg.CONF['compute']['default_instances'], |
16 | | - "key_pairs": cfg.CONF['compute']['default_key_pairs'], |
17 | | - "metadata_items": cfg.CONF['compute']['default_metadata_items'], |
18 | | - "ram": cfg.CONF['compute']['default_ram'], |
| 13 | + config.PARSER.get("compute",'default_injected_file_path_bytes'), |
| 14 | + "injected_files": config.PARSER.get("compute",'default_injected_files'), |
| 15 | + "instances": config.PARSER.get("compute",'default_instances'), |
| 16 | + "key_pairs": config.PARSER.get("compute",'default_key_pairs'), |
| 17 | + "metadata_items": config.PARSER.get("compute",'default_metadata_items'), |
| 18 | + "ram": config.PARSER.get("compute",'default_ram'), |
19 | 19 | "security_group_rules": |
20 | | - cfg.CONF['compute']['default_security_group_rules'], |
21 | | - "security_groups": cfg.CONF['compute']['default_security_groups'] |
| 20 | + config.PARSER.get("compute",'default_security_group_rules'), |
| 21 | + "security_groups": config.PARSER.get("compute",'default_security_groups') |
22 | 22 | } |
23 | 23 |
|
24 | 24 | resp.body = {'quota_set': qs} |
0 commit comments