Пример #1
0
 def GenerateResults(self):
   matches = []
   for match in self.matches:
     criterion, config = match["criterion"], match["config"]
     block = rdf_config_file.SshdMatchBlock(criterion=criterion, config=config)
     matches.append(block)
   yield rdf_config_file.SshdConfig(config=self.config, matches=matches)
Пример #2
0
 def testRdfFormatterAttributedDict(self):
     sshd = rdf_config_file.SshdConfig()
     sshd.config = rdf_protodict.AttributedDict(skynet="operational")
     template = "{config.skynet}"
     hinter = hints.Hinter(template=template)
     expected = "operational"
     result = hinter.Render(sshd)
     self.assertEqual(expected, result)