Updated oracle fixtures
This commit is contained in:
parent
42e1a4add3
commit
a3cc34ba8e
|
@ -138,6 +138,12 @@ def set_field(fields):
|
||||||
fields['maxval'] = 2000000000 # 2GB
|
fields['maxval'] = 2000000000 # 2GB
|
||||||
fields['default'] = 500000000 # 500M
|
fields['default'] = 500000000 # 500M
|
||||||
fields['resource'] = 1
|
fields['resource'] = 1
|
||||||
|
if fields['name'].lower() == 'db_32k_cache_size':
|
||||||
|
fields['tunable'] = False
|
||||||
|
fields['minval'] = 0
|
||||||
|
fields['maxval'] = 2000000000 # 2GB
|
||||||
|
fields['default'] = 500000000 # 500M
|
||||||
|
fields['resource'] = 1
|
||||||
if fields['name'].upper() == 'DB_RECYCLE_CACHE_SIZE':
|
if fields['name'].upper() == 'DB_RECYCLE_CACHE_SIZE':
|
||||||
fields['tunable'] = False
|
fields['tunable'] = False
|
||||||
fields['minval'] = 0
|
fields['minval'] = 0
|
||||||
|
|
|
@ -1039,11 +1039,12 @@
|
||||||
"unit": 3,
|
"unit": 3,
|
||||||
"tunable": false,
|
"tunable": false,
|
||||||
"description": "",
|
"description": "",
|
||||||
"minval": null,
|
"minval": 0,
|
||||||
"maxval": null,
|
"maxval": 2000000000,
|
||||||
"vartype": 2,
|
"vartype": 2,
|
||||||
"default": "0",
|
"default": 500000000,
|
||||||
"summary": "Size of cache for 32K buffers"
|
"summary": "Size of cache for 32K buffers",
|
||||||
|
"resource": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1324,11 +1324,12 @@
|
||||||
"unit": 3,
|
"unit": 3,
|
||||||
"tunable": false,
|
"tunable": false,
|
||||||
"description": "",
|
"description": "",
|
||||||
"minval": null,
|
"minval": 0,
|
||||||
"maxval": null,
|
"maxval": 2000000000,
|
||||||
"vartype": 2,
|
"vartype": 2,
|
||||||
"default": "0",
|
"default": 500000000,
|
||||||
"summary": "Size of cache for 32K buffers"
|
"summary": "Size of cache for 32K buffers",
|
||||||
|
"resource": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1419,11 +1419,12 @@
|
||||||
"unit": 3,
|
"unit": 3,
|
||||||
"tunable": false,
|
"tunable": false,
|
||||||
"description": "",
|
"description": "",
|
||||||
"minval": null,
|
"minval": 0,
|
||||||
"maxval": null,
|
"maxval": 2000000000,
|
||||||
"vartype": 2,
|
"vartype": 2,
|
||||||
"default": "0",
|
"default": 500000000,
|
||||||
"summary": "Size of cache for 32K buffers"
|
"summary": "Size of cache for 32K buffers",
|
||||||
|
"resource": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,7 +74,7 @@ urlpatterns = [
|
||||||
url(r'^create/user/', website_views.alt_create_user, name='backdoor_create_user'),
|
url(r'^create/user/', website_views.alt_create_user, name='backdoor_create_user'),
|
||||||
url(r'^delete/user/', website_views.alt_delete_user, name='backdoor_delete_user'),
|
url(r'^delete/user/', website_views.alt_delete_user, name='backdoor_delete_user'),
|
||||||
url(r'^info/(?P<name>[0-9a-zA-Z]+)', website_views.alt_get_info, name="backdoor_info"),
|
url(r'^info/(?P<name>[0-9a-zA-Z]+)', website_views.alt_get_info, name="backdoor_info"),
|
||||||
url(r'^set_constant/(?P<name>[0-9a-zA-Z_]+)', website_views.alt_set_constant, name="backdoor_set_constant"),
|
url(r'^set_constants/', website_views.alt_set_constants, name="backdoor_set_constants"),
|
||||||
|
|
||||||
# train ddpg with results in the given session
|
# train ddpg with results in the given session
|
||||||
url(r'^train_ddpg/sessions/(?P<session_id>[0-9]+)$', website_views.train_ddpg_loops, name='train_ddpg_loops'),
|
url(r'^train_ddpg/sessions/(?P<session_id>[0-9]+)$', website_views.train_ddpg_loops, name='train_ddpg_loops'),
|
||||||
|
|
|
@ -1141,19 +1141,16 @@ def alt_get_info(request, name):
|
||||||
|
|
||||||
|
|
||||||
@csrf_exempt
|
@csrf_exempt
|
||||||
def alt_set_constant(request, name):
|
def alt_set_constants(request):
|
||||||
# Sets a constant defined in settings/constants.py
|
constants = JSONUtil.loads(request.POST.get('constants', '{}'))
|
||||||
LOG.info('POST: %s', request.POST)
|
for name, value in constants.items():
|
||||||
LOG.info('POST.lists(): %s', request.POST.lists())
|
|
||||||
value = request.POST['value']
|
|
||||||
LOG.info('name: %s, value: %s, type: %s', name, value, type(value))
|
|
||||||
#data = {k: v[0] for k, v in request.POST.lists()}
|
|
||||||
try:
|
try:
|
||||||
utils.set_constant(name, value)
|
utils.set_constant(name, value)
|
||||||
except AttributeError as e:
|
except AttributeError as e:
|
||||||
LOG.warning(e)
|
LOG.warning(e)
|
||||||
return HttpResponse(e, status=400)
|
return HttpResponse(e, status=400)
|
||||||
return HttpResponse("Successfully updated {} to '{}'".format(name, value))
|
return HttpResponse("Successfully updated constants: {}".format(
|
||||||
|
', '.join('{}={}'.format(k, v) for k, v in constants.items())))
|
||||||
|
|
||||||
|
|
||||||
@csrf_exempt
|
@csrf_exempt
|
||||||
|
|
Loading…
Reference in New Issue