Module Expr Str ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad keyword NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad orelse If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If UnaryOpNot NameLoad body Raise Call AttributeLoad NameLoad attr Num Call AttributeLoad Str attr NameLoad TryExcept body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad keyword AttributeLoad SubscriptLoad NameLoad Index Num attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If UnaryOpNot NameLoad body Raise Call AttributeLoad NameLoad attr Num Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad attr If BoolOpAnd CompareIn Str NameLoad CompareEq AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str body Return Dict Str Str AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad Return Dict Str AttributeLoad NameLoad attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad Call NameLoad attr NameLoad attr keyword NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad Call NameLoad attr NameLoad attr Return Dict Str Str NameLoad NameLoad decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr Num Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list NameLoad decorator_list
N/A N/A 
Handlers dealing with nodes
 datetime datetime N/A web nailgun.api.v1.handlers.base BaseHandler nailgun.api.v1.handlers.base CollectionHandler nailgun.api.v1.handlers.base content nailgun.api.v1.handlers.base SingleHandler nailgun.api.v1.validators node node_validators nailgun errors nailgun objects nailgun.db db nailgun.db.sqlalchemy.models Node nailgun.task.manager NodeDeletionTaskManager nailgun.logger logger nailgun notifier NodeHandler N/A SingleHandler N/A N/A single N/A objects Node N/A validator N/A node_validators NodeValidator PUT N/A N/A self obj_id N/A N/A N/A :returns: JSONized Node object.

        :http: * 200 (OK)
               * 400 (error occured while processing of data)
               * 404 (Node not found in db)
         N/A obj N/A N/A self get_object_or_404 N/A self single obj_id N/A data N/A N/A self checked_data N/A N/A self validator validate_update instance obj N/A N/A N/A N/A N/A N/A self single update obj data N/A N/A N/A N/A errors NetworkTemplateCannotBeApplied N/A exc N/A N/A N/A N/A self http 400 N/A exc message N/A N/A N/A N/A self single to_json obj N/A content DELETE N/A N/A self obj_id N/A N/A N/A Deletes a node from DB and from Cobbler.

        :return: JSON-ed deletion task
        :http: * 200 (node has been succesfully deleted)
               * 202 (node is successfully scheduled for deletion)
               * 400 (data validation failed)
               * 404 (node not found in db)
               * 403 (on of the controllers is in error state)
         N/A node N/A N/A self get_object_or_404 N/A self single obj_id N/A task_manager N/A NodeDeletionTaskManager cluster_id N/A node cluster_id N/A N/A N/A task N/A N/A task_manager execute N/A node mclient_remove False N/A N/A N/A N/A errors ControllerInErrorState N/A e N/A N/A N/A N/A self http 403 N/A e message N/A N/A N/A self raise_task task N/A content N/A NodeCollectionHandler N/A CollectionHandler N/A N/A Node collection handler N/A validator N/A node_validators NodeValidator N/A collection N/A objects NodeCollection GET N/A N/A self N/A N/A N/A May receive cluster_id parameter to filter list of nodes

        :returns: Collection of JSONized Node objects.
        :http: * 200 (OK)
         N/A cluster_id N/A N/A N/A web input cluster_id None cluster_id N/A nodes N/A N/A N/A self collection eager_nodes_handlers None N/A N/A cluster_id N/A N/A nodes N/A N/A nodes filter_by cluster_id None N/A N/A cluster_id N/A N/A nodes N/A N/A nodes filter_by cluster_id cluster_id N/A N/A N/A N/A self collection to_json nodes N/A content PUT N/A N/A self N/A N/A N/A :returns: Collection of JSONized Node objects.

        :http: * 200 (nodes are successfully updated)
               * 400 (data validation failed)
         N/A data N/A N/A self checked_data N/A N/A self validator validate_collection_update N/A nodes_updated N/A N/A nd data N/A N/A node N/A N/A N/A N/A self collection single get_by_meta nd N/A N/A node N/A N/A N/A N/A self http 404 N/A N/A Can't find node: {0} format nd N/A N/A N/A N/A N/A N/A N/A self collection single update node nd N/A N/A N/A N/A errors NetworkTemplateCannotBeApplied N/A exc N/A N/A N/A N/A self http 400 N/A exc message N/A N/A N/A nodes_updated append N/A node id N/A nodes N/A N/A N/A self collection filter_by_id_list N/A N/A N/A self collection eager_nodes_handlers None nodes_updated N/A N/A N/A N/A self collection to_json nodes N/A content DELETE N/A N/A self N/A N/A N/A Deletes a batch of nodes.

        Takes (JSONed) list of node ids to delete.

        :return: JSON-ed deletion task
        :http: * 200 (nodes have been succesfully deleted)
               * 202 (nodes are successfully scheduled for deletion)
               * 400 (data validation failed)
               * 404 (nodes not found in db)
               * 403 (on of the controllers is in error state)
         N/A node_ids N/A N/A self checked_data validate_method N/A N/A self validator validate_collection_delete data N/A N/A N/A N/A web input get ids N/A nodes N/A N/A self get_objects_list_or_404 N/A self collection node_ids N/A task_manager N/A NodeDeletionTaskManager cluster_id N/A N/A nodes N/A 0 cluster_id N/A N/A N/A task N/A N/A task_manager execute nodes mclient_remove False N/A N/A N/A N/A errors ControllerInErrorState N/A e N/A N/A N/A N/A self http 403 N/A e message N/A N/A N/A self raise_task task N/A content N/A NodeAgentHandler N/A BaseHandler N/A N/A collection N/A objects NodeCollection N/A validator N/A node_validators NodeValidator PUT N/A N/A self N/A N/A N/A :returns: node id.

        :http: * 200 (node are successfully updated)
               * 304 (node data not changed since last request)
               * 400 (data validation failed)
               * 404 (node not found)
         N/A nd N/A N/A self checked_data N/A N/A self validator validate_update data N/A N/A web data N/A node N/A N/A N/A N/A self collection single get_by_meta nd N/A N/A node N/A N/A N/A N/A self http 404 N/A N/A Can't find node: {0} format nd N/A N/A node timestamp N/A N/A datetime now N/A N/A N/A node online N/A N/A N/A node online True N/A msg N/A N/A Node '{0}' is back online format N/A node human_readable_name N/A N/A N/A logger info msg N/A N/A N/A notifier notify discover msg node_id N/A node id N/A N/A N/A N/A db flush N/A N/A N/A agent_checksum nd N/A N/A node agent_checksum N/A nd N/A agent_checksum N/A N/A N/A id cached N/A node id True N/A N/A N/A N/A N/A self collection single update_by_agent node nd N/A N/A id N/A node id N/A content N/A NodesAllocationStatsHandler N/A BaseHandler N/A N/A Node allocation stats handler GET N/A N/A self N/A N/A N/A :returns: Total and unallocated nodes count.

        :http: * 200 (OK)
         N/A unallocated_nodes N/A N/A N/A N/A N/A N/A N/A db query Node filter_by cluster_id None count N/A total_nodes N/A N/A N/A N/A N/A db query Node count N/A N/A total unallocated total_nodes unallocated_nodes N/A content N/A NodeAttributesHandler N/A BaseHandler N/A N/A Node attributes handler N/A validator N/A node_validators NodeAttributesValidator GET N/A N/A self node_id N/A N/A N/A :returns: JSONized Node attributes.

        :http: * 200 (OK)
               * 404 (node not found in db)
         N/A node N/A N/A self get_object_or_404 N/A objects Node node_id N/A N/A N/A N/A objects Node get_attributes node N/A content PUT N/A N/A self node_id N/A N/A N/A :returns: JSONized Node attributes.

        :http: * 200 (OK)
               * 400 (wrong attributes data specified)
               * 404 (node not found in db)
         N/A node N/A N/A self get_object_or_404 N/A objects Node node_id N/A N/A N/A node cluster N/A N/A N/A N/A self http 400 N/A N/A Node '{}' doesn't belong to any cluster format N/A node id N/A data N/A N/A self checked_data node node cluster N/A node cluster N/A N/A N/A N/A objects Node update_attributes node data N/A N/A N/A N/A objects Node get_attributes node N/A content N/A