Пример #1
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)
Пример #2
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)
Пример #3
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)
Пример #4
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)
Пример #5
0
 def dumped(self, level):
     return utils.dumped_dict(dict(self).items(), level)
Пример #6
0
 def dumped(self, level):
     return utils.dumped_dict(dict(self).items(), level)
Пример #7
0
 def dumped(self, level=0):
     output = []
     for ps in self:
         output.append("%s:\n%s" % (FMTID.name_from_value(
             ps.fmtid), utils.dumped_dict(ps.as_dict(), level)))
     return utils.dumped("\n".join(output), level)
Пример #8
0
 def dumped(self, level=0):
     output = []
     for ps in self:
         output.append("%s:\n%s" % (FMTID.name_from_value(ps.fmtid), utils.dumped_dict(ps.as_dict(), level)))
     return utils.dumped("\n".join(output), level)