Ejemplo n.º 1
0
 def get_this_server(self):
     server_uuid = certs.get_splice_server_identity()
     environment = SPLICE_SERVER_INFO["environment"]
     description = SPLICE_SERVER_INFO["description"]
     hostname = SPLICE_SERVER_INFO["hostname"]
     server = SpliceServer.objects(uuid=server_uuid).first()
     if not server:
         server = SpliceServer(
             uuid=server_uuid,
             description=description,
             environment=environment,
             hostname=hostname
         )
         try:
             server.save()
         except Exception, e:
             _LOG.exception(e)
Ejemplo n.º 2
0
 def test_get_splice_server_identity(self):
     cn = certs.get_splice_server_identity(self.valid_identity_cert_pem)
     self.assertEqual(cn, self.expected_valid_identity_uuid)