def __init__(self):
        """
			Instanciates the validate operation
		"""
        self.datastoreManager = DatastoreManager.getInstance()
        self.moduleManager = ModuleManager.getInstance()
        self.rbacManager = rbacManager.getInstance()
        self.config = None
	def __init__(self): 
		"""
			Instanciates the validate operation
		"""
		self.datastoreManager = DatastoreManager.getInstance()
		self.moduleManager = ModuleManager.getInstance()
		self.rbacManager = rbacManager.getInstance()
		self.config = None
    def __init__(self):
        """
			Constructor of a Lock_operation command.
		"""
        # Get the unique instance of DatastoreManager class
        self.datastoreManager = DatastoreManager.getInstance()
        self.rbacManager = rbacManager.getInstance()

        # "running", "startup", "candidate", "url"
        self.target = None
        # target url text value (e.g.: ftp://madynes.loria.fr/config.txt)
        self.urlTarget = None
Ejemplo n.º 4
0
    def __init__(self):
        """
			Instanciates the edit-config operation
		"""
        self.datastoreManager = DatastoreManager.getInstance()
        self.moduleManager = ModuleManager.getInstance()
        self.rbacManager = rbacManager.getInstance()

        # Set default values
        self.defaultOperation = C.MERGE
        self.testOption = C.SET
        self.errorOption = C.STOP_ON_ERROR
	def __init__(self):
		"""
			Constructor of a Get_config_operation command.
		"""
		self.datastoreManager = DatastoreManager.getInstance()
		# "running", "startup", "candidate"
		self.source = C.RUNNING
		# filter node
		self.filter = None
		# Initializes the default value for filtering method
		self.filterType = C.SUBTREE
		self.subtree = None
	def __init__(self): 
		"""
			Instanciates the edit-config operation
		"""
		self.datastoreManager = DatastoreManager.getInstance()
		self.moduleManager = ModuleManager.getInstance()
		self.rbacManager = rbacManager.getInstance()

		# Set default values
		self.defaultOperation = C.MERGE
		self.testOption = C.SET
		self.errorOption = C.STOP_ON_ERROR
    def __init__(self):
        """
			Constructor of a Lock_operation command.
		"""
        # Get the unique instance of DatastoreManager class
        self.datastoreManager = DatastoreManager.getInstance()
        self.rbacManager = rbacManager.getInstance()

        # "running", "startup", "candidate", "url"
        self.target = None
        # target url text value (e.g.: ftp://madynes.loria.fr/config.txt)
        self.urlTarget = None
Ejemplo n.º 8
0
	def __init__(self): 
		"""
			Constructor of a Copy_config_operation command.
		"""
		self.datastoreManager = DatastoreManager.getInstance()
		self.moduleManager = ModuleManager.getInstance()
		self.rbacManager = rbacManager.getInstance()

		# "running", "startup", "candidate", "url"
		self.source = None
		# "running", "startup", "candidate", "url"
		self.target = None
		# source url text value (e.g.: ftp://madynes.loria.fr/config.txt)
		self.urlSource = None
		# target url text value (e.g.: ftp://madynes.loria.fr/config.txt)
		self.urlTarget = None
	def __init__(self): 
		"""
			Constructor of a Copy_config_operation command.
		"""
		self.datastoreManager = DatastoreManager.getInstance()
		self.moduleManager = ModuleManager.getInstance()
		self.rbacManager = rbacManager.getInstance()

		# "running", "startup", "candidate", "url"
		self.source = None
		# "running", "startup", "candidate", "url"
		self.target = None
		# source url text value (e.g.: ftp://madynes.loria.fr/config.txt)
		self.urlSource = None
		# target url text value (e.g.: ftp://madynes.loria.fr/config.txt)
		self.urlTarget = None
		
		self.sourceInbound = None
Ejemplo n.º 10
0
	def checkAccessCopyConfig(self, session):

		config = DatastoreManager.getInstance().getConfig(C.RUNNING, "config")
		scopes = self.getActiveScopes(session, "w")
		
		# Building the list of authorized nodes
		authorized_nodes = []
		for scope in scopes:
			try:
				ctx = Context(config.documentElement, processorNss = self.prefixes)
				l = Evaluate(scope, ctx)
				for node in l:
					# Il faudrait verifier que 
					#	- ce noeud n'est pas deja dans la liste pour eviter les doublons
					#	- ce n'est pas un fils d'un noeud deja present dans la liste. Car si les droits d'acces en lecture sont donnes pour un parent, ca n'apprend rien de plus d'ajouter ce noeud
					#	- si ce noeud est un parent d'un noeud de la liste, il faut degager l'enfant car il ne sert plus a rien.
					# A FINIR DONC...
					authorized_nodes.append(node)
			except Exception,exp:
				print str(exp)