21
21
from .logger import log
22
22
from .nitro_resource_map import NITRO_RESOURCE_MAP
23
23
24
+
24
25
@trace
25
26
def get_netscaler_version (client ):
26
27
is_exist , response = get_resource (client , "nsversion" )
@@ -114,7 +115,7 @@ def get_resource(client, resource_name, resource_id=None, resource_module_params
114
115
# for zero bindings and some resources, the response_body will be {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'}
115
116
if resource_name in NESTED_POST_DATA_RESOURCES :
116
117
if "routerDynamicRouting" in response_body :
117
- return_response = response_body ["routerDynamicRouting" ][NESTED_POST_DATA_RESOURCES_ALIAS [resource_name ]]
118
+ return_response = response_body ["routerDynamicRouting" ][NESTED_POST_DATA_RESOURCES_ALIAS [resource_name ]]
118
119
else :
119
120
return False , []
120
121
elif resource_name not in response_body :
@@ -125,8 +126,8 @@ def get_resource(client, resource_name, resource_id=None, resource_module_params
125
126
]
126
127
127
128
return False , []
128
-
129
- # `update-only` resources return a dict instead of a list.
129
+
130
+ # `update-only` resources return a dict instead of a list.
130
131
if resource_name not in NESTED_POST_DATA_RESOURCES :
131
132
return_response = response_body [resource_name ]
132
133
# FIXME: NITRO-BUG: for some resources like `policypatset_pattern_binding`, NITRO returns keys with uppercase. eg: `String` for `string`.
@@ -206,6 +207,7 @@ def is_resource_exists(client, resource_name, resource_module_params):
206
207
)
207
208
return is_exists
208
209
210
+
209
211
@trace
210
212
def _check_create_resource_params (resource_name , resource_module_params , action = None ):
211
213
post_data = {}
0 commit comments