Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias identifier ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias Import alias identifier Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str If CompareEq NameLoad Str body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad orelse Return Call NameLoad Call AttributeLoad NameLoad attr Str Str orelse TryExcept body If BoolOpAnd CompareIsNot AttributeLoad AttributeLoad NameLoad attr attr NameLoad CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr Str Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If Call AttributeLoad AttributeLoad NameLoad attr attr body Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Return Call NameLoad Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str If UnaryOpNot Call AttributeLoad NameLoad attr body If BoolOpOr UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr Str Str orelse If CompareEq AttributeLoad NameLoad attr Str body If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad orelse If CompareEq NameLoad Str body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr Str Str NameLoad orelse If CompareEq NameLoad Str body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad orelse If CompareEq NameLoad Str body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Return Call NameLoad Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str If CompareNotEq AttributeLoad NameLoad attr Str body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr If CompareIn NameLoad ListLoad Str Str Str Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call NameLoad Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If UnaryOpNot NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq NameLoad Str body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs NameLoad NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad If Call NameLoad NameLoad NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareIn NameLoad ListLoad Str Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad If Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Str orelse Assign NameStore ListLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Expr Call AttributeLoad NameLoad attr Str Return Call NameLoad Str Dict Str NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str If CompareEq NameLoad Str body Return Call NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Return Call NameLoad NameLoad NameLoad keyword NameLoad orelse If CompareEq NameLoad Str body Return Call NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Return Call NameLoad NameLoad NameLoad decorator_list
N/A N/A 
Copyright 2015, Cisco Systems, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

@author: Pravin Gohite, Cisco Systems, Inc.
 __future__ print_function N/A os N/A logging N/A shutil N/A lxml.etree ET django.contrib.auth authenticate login logout django.http HttpResponse django.shortcuts render_to_response django.template RequestContext django.views.decorators.csrf csrf_exempt explorer.utils.cxml Cxml explorer.utils.misc Response explorer.utils.adapter Adapter explorer.utils.collection Collection explorer.utils.misc ServerSettings explorer.utils.admin ModuleAdmin explorer.utils.schema get_schema download_schema add_schema N/A explorer.utils.uploader Uploader N/A N/A N/A logging basicConfig level N/A logging WARNING login_handler N/A N/A request N/A N/A N/A  HTTP Request handler function for user login / logout requests  N/A session N/A N/A ET Element session N/A N/A request POST N/A N/A action N/A N/A request POST N/A action N/A N/A action login N/A N/A username N/A N/A request POST N/A username N/A password N/A N/A request POST N/A password N/A user N/A authenticate username username password password N/A N/A N/A user None N/A user is_active N/A N/A N/A login request user N/A N/A session text username N/A N/A N/A HttpResponse N/A N/A Response error login Authentication Failed N/A N/A N/A N/A N/A N/A N/A N/A request session session_key None N/A N/A N/A request session session_key N/A N/A session_dir N/A N/A ServerSettings session_path N/A N/A request session session_key N/A N/A N/A N/A os path exists session_dir N/A N/A N/A N/A logging debug N/A Cleaning  session_dir N/A N/A N/A shutil rmtree session_dir N/A N/A logout request N/A N/A N/A N/A N/A N/A logging exception Failed N/A N/A N/A N/A logging debug Logout success!! N/A N/A HttpResponse N/A N/A Response success action ok session N/A N/A HttpResponse N/A N/A Response error unknown Invalid request!! N/A csrf_exempt session_handler N/A N/A request N/A N/A N/A  HTTP Request handler function to check if user session exists  N/A session N/A N/A ET Element session N/A N/A N/A N/A request user is_authenticated N/A N/A N/A session text N/A N/A request user username N/A N/A HttpResponse N/A N/A Response success session ok session N/A csrf_exempt upload_handler N/A N/A request N/A N/A N/A  HTTP Request handler function to upload yang models  N/A mode N/A N/A N/A request GET get mode N/A N/A N/A logging debug N/A N/A N/A request method :Received upload request ..  mode N/A N/A N/A N/A N/A request user is_authenticated N/A N/A N/A N/A logging warning User must be logged in !! N/A N/A HttpResponse N/A N/A Response error mode Unauthorized N/A N/A N/A N/A ServerSettings user_aware N/A N/A N/A N/A N/A N/A N/A request user has_perm explorer.delete_yangmodel N/A N/A N/A N/A request user has_perm explorer.change_yangmodel N/A N/A N/A N/A logging warning Unauthorized upload request ..  N/A N/A HttpResponse N/A N/A Response error mode User does not have permission to upload !! N/A N/A N/A request method POST N/A N/A directory N/A N/A ServerSettings session_path N/A N/A request session session_key N/A _file N/A N/A Uploader upload_file N/A N/A request FILES N/A Filedata directory N/A N/A _file None N/A N/A module N/A N/A ET Element module N/A N/A module text _file N/A rval N/A N/A Response success upload ok xml module N/A N/A N/A logging debug rval N/A N/A HttpResponse rval N/A N/A HttpResponse N/A N/A Response error upload Failed to upload N/A N/A N/A N/A request method GET N/A N/A N/A mode sync N/A N/A filename N/A N/A N/A request GET get file N/A index N/A N/A N/A request GET get index N/A N/A N/A logging info N/A N/A N/A Received sync request for  filename , index  index N/A N/A success response N/A N/A Uploader sync_file N/A N/A request user username N/A N/A request session session_key filename index N/A success N/A N/A N/A HttpResponse N/A N/A Response success mode ok N/A N/A HttpResponse N/A N/A Response error mode compilation failed xml response N/A N/A N/A mode commit N/A N/A N/A success modules N/A N/A Uploader commit_files N/A N/A request user username N/A N/A request session session_key N/A success N/A N/A N/A HttpResponse N/A N/A Response success commit ok modules N/A N/A N/A mode init N/A N/A N/A success modules N/A N/A Uploader get_upload_files N/A N/A request user username N/A N/A request session session_key N/A success N/A N/A N/A HttpResponse N/A N/A Response success mode ok modules N/A N/A N/A mode clear N/A N/A N/A success modules N/A N/A Uploader clear_upload_files N/A N/A request user username N/A N/A request session session_key N/A success N/A N/A N/A HttpResponse N/A N/A Response success mode ok modules N/A N/A HttpResponse N/A N/A Response error mode failed N/A N/A render_to_response upload.html N/A csrf_exempt admin_handler N/A N/A request N/A N/A N/A  HTTP Request handler function to handle actions on yang modules  N/A N/A N/A N/A N/A request user is_authenticated N/A N/A N/A HttpResponse N/A N/A Response error None User must be logged in N/A N/A N/A request method GET N/A N/A N/A HttpResponse N/A N/A Response error None Invalid admin Request N/A action N/A N/A N/A request GET get action N/A N/A N/A logging info N/A Received admin request %s for user %s N/A action N/A N/A request user username N/A N/A action N/A subscribe unsubscribe delete graph N/A N/A payload N/A N/A N/A request GET get payload None N/A N/A print N/A str payload N/A N/A rc msg N/A N/A ModuleAdmin admin_action N/A N/A request user username payload action N/A N/A rc N/A N/A N/A HttpResponse N/A N/A Response error action msg N/A N/A action graph N/A N/A N/A HttpResponse N/A N/A Response success action msg N/A modules N/A N/A ModuleAdmin get_modules N/A N/A request user username N/A N/A HttpResponse N/A N/A Response success action ok xml modules N/A request_handler N/A N/A request N/A N/A N/A  HTTP Request handler function to handle actions on collections  N/A mode N/A N/A N/A request GET get mode N/A reply_xml None N/A N/A N/A logging info N/A request_handler: Received Request: (%s) mode N/A N/A mode get-collection-list N/A N/A reply_xml N/A N/A Collection list N/A N/A N/A mode load-collection N/A N/A metadata N/A N/A N/A request GET get metadata N/A reply_xml N/A N/A Collection load N/A N/A request user username metadata N/A N/A reply_xml None N/A N/A N/A HttpResponse N/A N/A Response error mode Failed N/A N/A isinstance reply_xml str N/A N/A N/A HttpResponse N/A N/A Response success mode reply_xml N/A N/A N/A mode add-collection N/A N/A metadata N/A N/A N/A request GET get metadata N/A payload N/A N/A N/A request GET get payload N/A N/A N/A logging debug N/A metadata:  metadata N/A N/A N/A logging debug N/A payload:  payload N/A N/A N/A N/A Collection add metadata payload N/A N/A N/A HttpResponse N/A N/A Response error mode Failed N/A reply_xml N/A N/A Collection list N/A mode get-collection-list N/A N/A N/A mode delete-collection N/A N/A metadata N/A N/A N/A request GET get metadata N/A N/A N/A N/A Collection remove metadata N/A N/A N/A HttpResponse N/A N/A Response error mode Failed N/A reply_xml N/A N/A Collection list N/A mode get-collection-list N/A N/A N/A mode rpc N/A N/A req N/A N/A N/A request GET get payload N/A reply_xml N/A N/A Adapter gen_rpc N/A N/A request user username req N/A N/A isinstance reply_xml str N/A N/A N/A HttpResponse N/A N/A Response success mode reply_xml N/A N/A N/A mode N/A get-cap run-rpc N/A N/A payload N/A N/A N/A request GET get payload N/A N/A N/A logging debug N/A run:  payload N/A reply_xml N/A N/A Adapter run_request N/A N/A request user username payload N/A N/A HttpResponse N/A N/A Response success mode ok reply_xml N/A module_handler N/A N/A request N/A N/A N/A 
    Handle module request from UI. Response from this request builds
    UI Explorer tree
     N/A N/A N/A logging debug module_handler: enter N/A lst N/A N/A N/A N/A N/A request user is_authenticated N/A N/A path N/A N/A N/A request GET get node N/A username N/A N/A request user username N/A N/A path root N/A N/A modules N/A N/A ModuleAdmin get_modulelist username N/A N/A N/A modules sort N/A path N/A N/A modules N/A N/A N/A N/A path split / N/A 0 N/A module modules N/A N/A filename N/A N/A ModuleAdmin cxml_path username module N/A N/A filename None N/A N/A N/A N/A logging debug N/A module_handler: loading  filename N/A module N/A Cxml filename N/A nodes N/A N/A module get_lazy_node path N/A N/A N/A lst extend N/A N/A N/A ET tostring node N/A node nodes N/A N/A N/A N/A logging error N/A module_handler: %s not found !! module N/A N/A N/A logging debug module_handler: exit N/A N/A render_to_response loader.xml N/A nodes lst N/A RequestContext request N/A schema_handler N/A N/A request N/A N/A N/A 
    Handle schema request from UI.
     N/A N/A N/A logging debug schema_handler: enter N/A req N/A N/A N/A request GET get payload N/A action N/A N/A N/A request GET get action N/A N/A N/A logging debug N/A Recieved schema Request (%s) action N/A N/A N/A N/A N/A request user is_authenticated N/A N/A N/A N/A logging error User must be logged in !! N/A N/A HttpResponse N/A N/A Response error action Unauthorized N/A N/A action get-schema N/A N/A N/A get_schema request req N/A N/A N/A action get-all-schema N/A N/A N/A get_schema request req all True N/A N/A N/A action download-schema N/A N/A N/A download_schema request req N/A N/A N/A action add-schema N/A N/A N/A add_schema request req N/A