Beispiel #1
0
 def test_should_delete_subca(self):
     subca = cert_res.create_subordinate_ca(
         project_model=self.project,
         name=self.name,
         description=self.description,
         subject_dn=self.subject_name,
         parent_ca_ref=self.parent_ca_ref,
         creator_id=self.creator_id)
     self.assertIsInstance(subca, models.CertificateAuthority)
     cert_res.delete_subordinate_ca(self.project.external_id, subca)
     self.cert_plugin.delete_ca.assert_called_once_with(subca.plugin_ca_id)
 def test_should_delete_subca(self):
     subca = cert_res.create_subordinate_ca(
         project_model=self.project,
         name=self.name,
         description=self.description,
         subject_dn=self.subject_name,
         parent_ca_ref=self.parent_ca_ref,
         creator_id=self.creator_id
     )
     self.assertIsInstance(subca, models.CertificateAuthority)
     cert_res.delete_subordinate_ca(self.project.external_id, subca)
     self.cert_plugin.delete_ca.assert_called_once_with(subca.plugin_ca_id)
Beispiel #3
0
 def test_should_delete_subca_and_all_related_db_entities(self):
     subca = cert_res.create_subordinate_ca(
         project_model=self.project,
         name=self.name,
         description=self.description,
         subject_dn=self.subject_name,
         parent_ca_ref=self.parent_ca_ref,
         creator_id=self.creator_id)
     project_ca = models.ProjectCertificateAuthority(
         self.project.id, subca.id)
     project_ca_repo.create_from(project_ca)
     preferred_ca = models.PreferredCertificateAuthority(
         self.project.id, subca.id)
     preferred_ca_repo.create_from(preferred_ca)
     cert_res.delete_subordinate_ca(self.project.external_id, subca)
     self.cert_plugin.delete_ca.assert_called_once_with(subca.plugin_ca_id)
 def test_should_delete_subca_and_all_related_db_entities(self):
     subca = cert_res.create_subordinate_ca(
         project_model=self.project,
         name=self.name,
         description=self.description,
         subject_dn=self.subject_name,
         parent_ca_ref=self.parent_ca_ref,
         creator_id=self.creator_id
     )
     project_ca = models.ProjectCertificateAuthority(
         self.project.id,
         subca.id
     )
     project_ca_repo.create_from(project_ca)
     preferred_ca = models.PreferredCertificateAuthority(
         self.project.id,
         subca.id)
     preferred_ca_repo.create_from(preferred_ca)
     cert_res.delete_subordinate_ca(self.project.external_id, subca)
     self.cert_plugin.delete_ca.assert_called_once_with(subca.plugin_ca_id)
Beispiel #5
0
 def on_delete(self, external_project_id, **kwargs):
     cert_resources.delete_subordinate_ca(external_project_id, self.ca)
     LOG.info(u._LI('Deleted CA for project: %s'), external_project_id)
Beispiel #6
0
 def on_delete(self, external_project_id, **kwargs):
     cert_resources.delete_subordinate_ca(external_project_id, self.ca)
     LOG.info(u._LI('Deleted CA for project: %s'), external_project_id)