Exemple #1
0
 def dumped(self, level):
     output = []
     output.append("user: %s" % self.User)
     output.append("owner: %s" % self.Owner)
     output.append("groups:\n%s" % utils.dumped_list(self.Groups, level))
     output.append("restricted_sids:\n%s" % utils.dumped_list(self.RestrictedSids, level))
     output.append("privileges:\n%s" % utils.dumped_list(sorted(self.Privileges), level))
     output.append("primary_group: %s" % self.PrimaryGroup)
     output.append("source: %s, %s" % self.Source)
     output.append("default_dacl:\n%s" % self.DefaultDacl.dumped(level))
     output.append("type: %s" % self.Type)
     output.append("session_id: %s" % self.SessionId)
     output.append("statistics:\n%s" % utils.dumped_dict(self.Statistics, level))
     return utils.dumped("\n".join(output), level)
Exemple #2
0
 def dumped (self, level):
   output = []
   output.append (u"user: %s" % self.User)
   output.append (u"owner: %s" % self.Owner)
   output.append (u"groups:\n%s" % utils.dumped_list (self.Groups, level))
   output.append (u"restricted_sids:\n%s" % utils.dumped_list (self.RestrictedSids, level))
   output.append (u"privileges:\n%s" % utils.dumped_list (sorted (self.Privileges), level))
   output.append (u"primary_group: %s" % self.PrimaryGroup)
   output.append (u"source: %s, %s" % self.Source)
   output.append (u"default_dacl:\n%s" % self.DefaultDacl.dumped (level))
   output.append (u"type: %s" % self.Type)
   output.append (u"session_id: %s" % self.SessionId)
   output.append (u"statistics:\n%s" % utils.dumped_dict (self.Statistics, level))
   return utils.dumped (u"\n".join (output), level)
Exemple #3
0
 def dumped(self, level=0):
     output = []
     output.append(self.as_string())
     output.append("access: %s" % self.access)
     if bool(self):
         output.append("keys:\n%s" % utils.dumped_list((key.name for key in self.iterkeys(ignore_access_errors=True)), level))
         output.append("values:\n%s" % utils.dumped_dict(dict((name or "(Default)", repr(value)) for (name, value) in self.itervalues(ignore_access_errors=True)), level))
         output.append("security:\n%s" % utils.dumped(self.security().dumped(level), level))
     return utils.dumped("\n".join(output), level)
Exemple #4
0
 def dumped(self, level=0):
     output = []
     if self.auto_backup_log_files: output.append("auto_backup_log_files: %s" % self.auto_backup_log_files)
     if self.display_name_file: output.append("display_name_file: %s" % self.display_name_file)
     if self.display_name_id: output.append("display_name_id: %s" % self.display_name_id)
     if self.file: output.append("file: %s" % self.file)
     if self.max_size is not None: output.append("max_size: %s" % utils.size_as_mb(self.max_size))
     if self.primary_module: output.append("primary_module: %s" % self.primary_module)
     if self.restrict_guest_access: output.append("restrict_guest_access: %s" % self.restrict_guest_access)
     if self.retention: output.append("retention: %s" % utils.secs_as_string(self.retention))
     if self.sources: output.append("sources: %s" % utils.dumped_list(self.sources, level))
     return utils.dumped("\n".join(output), level)
Exemple #5
0
 def dumped(self, level=0):
     output = []
     output.append(u"auto_backup_log_files: %s" %
                   self.auto_backup_log_files)
     output.append(u"display_name_file: %s" % self.display_name_file)
     output.append(u"display_name_id: %s" % self.display_name_id)
     output.append(u"file: %s" % self.file)
     output.append(u"max_size: %s" % utils.size_as_mb(self.max_size))
     output.append(u"primary_module: %s" % self.primary_module)
     output.append(u"restrict_guest_access: %s" %
                   self.restrict_guest_access)
     output.append(u"retention: %s" % utils.secs_as_string(self.retention))
     output.append(u"sources: %s" % utils.dumped_list(self.sources, level))
     return utils.dumped(u"\n".join(output), level)
Exemple #6
0
 def dumped(self, level=0):
     output = []
     output.append(self.as_string())
     output.append("access: %s" % self.access)
     if bool(self):
         output.append("keys:\n%s" % utils.dumped_list(
             (key.name
              for key in self.iterkeys(ignore_access_errors=True)), level))
         output.append("values:\n%s" % utils.dumped_dict(
             dict((name or "(Default)", repr(value))
                  for (name, value) in self.itervalues(
                      ignore_access_errors=True)), level))
         output.append("security:\n%s" %
                       utils.dumped(self.security().dumped(level), level))
     return utils.dumped("\n".join(output), level)