Minor fixes necessary for customer api calls
Change-Id: I1d8f18bc4b3d59f49493d994dda0980a0d5fc760
This commit is contained in:
parent
4f8d9ddbfe
commit
e4dd311a24
@ -88,7 +88,7 @@ class RegionController(rest.RestController):
|
||||
|
||||
return result
|
||||
|
||||
@wsexpose(None, str, str, str, status_code=204)
|
||||
@wsexpose(None, str, str, str, str, status_code=204)
|
||||
def delete(self, customer_id, region_id, force_delete='False'):
|
||||
|
||||
if force_delete == 'True':
|
||||
@ -101,7 +101,8 @@ class RegionController(rest.RestController):
|
||||
authentication.authorize(request, 'customers:delete_region')
|
||||
try:
|
||||
customer_logic = CustomerLogic()
|
||||
customer_logic.delete_region(customer_id, region_id, request.transaction_id)
|
||||
customer_logic.delete_region(customer_id, region_id, request.transaction_id,
|
||||
is_rds_client_request, force_delete)
|
||||
LOG.info("RegionController - Delete Region (delete) finished well")
|
||||
|
||||
event_details = 'Customer {} region: {} deleted'.format(
|
||||
|
@ -265,8 +265,8 @@ class DataManager(object):
|
||||
'storage': ['gigabytes', 'snapshots', 'volumes'],
|
||||
'network': ['floating_ips', 'networks', 'ports', 'routers',
|
||||
'subnets', 'security_groups', 'security_group_rules',
|
||||
'health_monitor', 'member', 'nat_instance', 'pool',
|
||||
'route_table', 'vip'
|
||||
'health_monitors', 'members', 'nat_instance', 'pools',
|
||||
'route_table', 'vips'
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,16 @@ audit = {
|
||||
'time_wait_between_retries': 1
|
||||
}
|
||||
|
||||
cms = {
|
||||
'base_url': config.cms['base_url'],
|
||||
'delete_region': 'v1/orm/customers/{0}/regions/{1}'
|
||||
}
|
||||
|
||||
fms = {
|
||||
'base_url': config.fms['base_url'],
|
||||
'delete_region': 'v1/orm/flavors/{0}/regions/{1}'
|
||||
}
|
||||
|
||||
ims = {
|
||||
'base_url': config.ims['base_url'],
|
||||
'metadata_path': 'v1/orm/images/{0}/regions/{1}/metadata'
|
||||
@ -54,9 +64,9 @@ ordupdate = {
|
||||
'discovery_port': config.rms['port'],
|
||||
'template_type': 'hot',
|
||||
# This flag should be false only in case the ord does not support https.
|
||||
'https_enabled': True,
|
||||
'https_enabled': False,
|
||||
# ORD supports HTTPS and you don't need a certificate? set 'cert_path': ''
|
||||
'cert_path': '../resources/ord.crt'
|
||||
'cert_path': ''
|
||||
}
|
||||
|
||||
UUID_URL = config.uuid['base_url'] + 'v1/uuids'
|
||||
@ -82,8 +92,10 @@ yaml_configs = {
|
||||
'cms_template_version': {
|
||||
'resource_v1': {
|
||||
'ranger_agent_version': 3.0,
|
||||
'quota_unsupported_params': ['vips', 'members', 'pools', 'nat_instances', 'route_tables',
|
||||
'health_monitors']
|
||||
'quota_unsupported_params': ['vips', 'members', 'pools',
|
||||
'nat_instance', 'route_table',
|
||||
'health_monitors', 'loadbalancer',
|
||||
'listener']
|
||||
},
|
||||
'resource_v2': {
|
||||
'ranger_agent_version': 3.6,
|
||||
@ -108,7 +120,6 @@ block_by_status = "Submitted"
|
||||
# this tells which values to allow resource submit the region
|
||||
allow_region_statuses = ['functional']
|
||||
|
||||
# region_resource_id_status configurations
|
||||
region_resource_id_status = {
|
||||
# interval_time_validation in minutes
|
||||
'max_interval_time': {
|
||||
@ -138,7 +149,7 @@ region_resource_id_status = {
|
||||
'allowed_ranger_agent_resource_version':
|
||||
{
|
||||
'customer': '3.0',
|
||||
'image': '3.6',
|
||||
'image': '3.0',
|
||||
'flavor': '3.0'
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import logging
|
||||
import re
|
||||
import requests
|
||||
|
||||
from orm.services.resource_distributor.rds.proxies import ims_proxy
|
||||
from orm.services.resource_distributor.rds.proxies import rds_resource_service_proxy
|
||||
from orm.services.resource_distributor.rds.services.base import ErrorMessage
|
||||
|
||||
from pecan import conf
|
||||
@ -16,7 +16,7 @@ def post_data_to_image(data):
|
||||
logger.debug("send metadata {} to ims :- {} for region {}".format(
|
||||
data['resource_extra_metadata'], data['resource_id'], data['region']))
|
||||
|
||||
ims_proxy.send_image_metadata(
|
||||
rds_resource_service_proxy.send_image_metadata(
|
||||
meta_data=data['resource_extra_metadata'],
|
||||
resource_id=data['resource_id'], region=data['region'])
|
||||
|
||||
@ -25,7 +25,7 @@ def post_data_to_image(data):
|
||||
|
||||
def invoke_delete_region(data):
|
||||
if data['resource_operation'] == 'delete' and (data['status'] == 'Success' or data['error_code'] == 'ORD_012'):
|
||||
ims_proxy.invoke_resources_region_delete(
|
||||
rds_resource_service_proxy.invoke_resources_region_delete(
|
||||
resource_type=data['resource_type'],
|
||||
resource_id=data['resource_id'], region=data['region'])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user