'Call ``DELETE /domains/{domain_id}``.
The sample data set up already has a user and project that is part of
self.domain. Additionally we will create a group and a credential
within it. Since we will authenticate in this domain,
we create another set of entities in a second domain.  Deleting this
second domain should delete all these new entities. In addition,
all the entities in the regular self.domain should be unaffected
by the delete.
Test Plan:
- Create domain2 and a 2nd set of entities
- Disable domain2
- Delete domain2
- Check entities in domain2 have been deleted
- Check entities in self.domain are unaffected'

def test_delete_domain(self):

    group = unit.new_group_ref(domain_id=self.domain_id)
    group = self.identity_api.create_group(group)
    credential = unit.new_credential_ref(user_id=self.user['id'], project_id=self.project_id)
    self.credential_api.create_credential(credential['id'], credential)
    domain2 = unit.new_domain_ref()
    self.resource_api.create_domain(domain2['id'], domain2)
    project2 = unit.new_project_ref(domain_id=domain2['id'])
    project2 = self.resource_api.create_project(project2['id'], project2)
    user2 = unit.new_user_ref(domain_id=domain2['id'], project_id=project2['id'])
    user2 = self.identity_api.create_user(user2)
    group2 = unit.new_group_ref(domain_id=domain2['id'])
    group2 = self.identity_api.create_group(group2)
    credential2 = unit.new_credential_ref(user_id=user2['id'], project_id=project2['id'])
    self.credential_api.create_credential(credential2['id'], credential2)
    domain2['enabled'] = False
    r = self.patch(('/domains/%(domain_id)s' % {'domain_id': domain2['id']}), body={'domain': {'enabled': False}})
    self.assertValidDomainResponse(r, domain2)
    self.delete(('/domains/%(domain_id)s' % {'domain_id': domain2['id']}))
    self.assertRaises(exception.DomainNotFound, self.resource_api.get_domain, domain2['id'])
    self.assertRaises(exception.ProjectNotFound, self.resource_api.get_project, project2['id'])
    self.assertRaises(exception.GroupNotFound, self.identity_api.get_group, group2['id'])
    self.assertRaises(exception.UserNotFound, self.identity_api.get_user, user2['id'])
    self.assertRaises(exception.CredentialNotFound, self.credential_api.get_credential, credential2['id'])
    r = self.resource_api.get_domain(self.domain['id'])
    self.assertDictEqual(self.domain, r)
    r = self.resource_api.get_project(self.project['id'])
    self.assertDictEqual(self.project, r)
    r = self.identity_api.get_group(group['id'])
    self.assertDictEqual(group, r)
    r = self.identity_api.get_user(self.user['id'])
    self.user.pop('password')
    self.assertDictEqual(self.user, r)
    r = self.credential_api.get_credential(credential['id'])
    self.assertDictEqual(credential, r)
