vaultmanager/lib/AuthMethods/AuthMethodAppRole.py
def tune_roles(self):
        """
        Tuning already existing roles in Vault
        """
        self.logger.debug("Tuning roles")
        for role in self.auth_config:
            if role in self.distant_approles:
                params = {}
                for param in self.distant_approles[role]:
                    if param not in self.auth_config[role]:
                        params[param] = self.auth_config_default[param]
                for param in self.auth_config[role]:
                    if param not in self.distant_approles[role]:
                        params[param] = self.auth_config[role][param]
                    elif isinstance(self.auth_config[role][param], list):
                        if sorted(self.auth_config[role][param]) !=\
                                sorted(self.distant_approles[role][param]):
                            params[param] = self.auth_config[role][param]
                    elif self.auth_config[role][param] !=\
                            self.distant_approles[role][param]:
                        params[param] = self.auth_config[role][param]
                if len(params):
                    self.logger.info("Tuning %s/role/%s with %s" %
                                     (self.mount_point, role, params))
                    self.vault_client.auth_approle_tune(
                        role_name=role,
                        role_conf=params,
                        mount_point=self.mount_point
                    )

        Tuning already existing roles in Vault
        
Tuning already existing roles in Vault
Tuning already existing roles in Vault
def tune_roles(self):
        self.logger.debug("Tuning roles")
        for role in self.auth_config:
            if role in self.distant_approles:
                params = {}
                for param in self.distant_approles[role]:
                    if param not in self.auth_config[role]:
                        params[param] = self.auth_config_default[param]
                for param in self.auth_config[role]:
                    if param not in self.distant_approles[role]:
                        params[param] = self.auth_config[role][param]
                    elif isinstance(self.auth_config[role][param], list):
                        if sorted(self.auth_config[role][param]) !=\
                                sorted(self.distant_approles[role][param]):
                            params[param] = self.auth_config[role][param]
                    elif self.auth_config[role][param] !=\
                            self.distant_approles[role][param]:
                        params[param] = self.auth_config[role][param]
                if len(params):
                    self.logger.info("Tuning %s/role/%s with %s" %
                                     (self.mount_point, role, params))
                    self.vault_client.auth_approle_tune(
                        role_name=role,
                        role_conf=params,
                        mount_point=self.mount_point
                    )
def tune_roles ( self ) : self . logger . debug ( "Tuning roles" ) for role in self . auth_config : if role in self . distant_approles : params = { } for param in self . distant_approles [ role ] : if param not in self . auth_config [ role ] : params [ param ] = self . auth_config_default [ param ] for param in self . auth_config [ role ] : if param not in self . distant_approles [ role ] : params [ param ] = self . auth_config [ role ] [ param ] elif isinstance ( self . auth_config [ role ] [ param ] , list ) : if sorted ( self . auth_config [ role ] [ param ] ) != sorted ( self . distant_approles [ role ] [ param ] ) : params [ param ] = self . auth_config [ role ] [ param ] elif self . auth_config [ role ] [ param ] != self . distant_approles [ role ] [ param ] : params [ param ] = self . auth_config [ role ] [ param ] if len ( params ) : self . logger . info ( "Tuning %s/role/%s with %s" % ( self . mount_point , role , params ) ) self . vault_client . auth_approle_tune ( role_name = role , role_conf = params , mount_point = self . mount_point )
Tuning already existing roles in Vault
Tuning already existing roles in Vault
"""
        Tuning already existing roles in Vault
        """
self