Esempio n. 1
0
def delete_tenant_resources():
    nova.delete_user_keypairs()

    # Snapshots must be deleted before the volumes, because a spanpshot depends
    # of a volume. A pause is required.
    cinder.delete_tenant_volume_snapshots()
    nova.delete_tenant_vms()

    # VM must be deleted before purging the security groups
    while cinder.get_tenant_volume_snapshots():
        time.sleep(1)
    nova.delete_tenant_security_groups()
    # TODO: remove rules from default secgroup. This secgroup cannot be deleted.

    glance.delete_tenant_images()

    cinder.delete_tenant_volumes()
    cinder.delete_tenant_backup_volumes()

    neutron.delete_tenant_ports()
    neutron.delete_tenant_securitygroups()
    neutron.delete_tenant_floatingips()
    neutron.delete_tenant_subnets()
    neutron.delete_tenant_networks()
    neutron.delete_tenant_routers()
Esempio n. 2
0
def delete_tenant_resources():
    nova.delete_user_keypairs()

    # Snapshots must be deleted before the volumes, because a spanpshot depends
    # of a volume. A pause is required.
    cinder.delete_tenant_volume_snapshots()
    nova.delete_tenant_vms()

    # VM must be deleted before purging the security groups
    while cinder.get_tenant_volume_snapshots():
        time.sleep(1)
    nova.delete_tenant_security_groups()
    # TODO: remove rules from default secgroup. This secgroup cannot be deleted.

    glance.delete_tenant_images()

    cinder.delete_tenant_volumes()
    cinder.delete_tenant_backup_volumes()

    neutron.delete_tenant_ports()
    neutron.delete_tenant_securitygroups()
    neutron.delete_tenant_floatingips()
    neutron.delete_tenant_subnets()
    neutron.delete_tenant_networks()
    neutron.delete_tenant_routers()
Esempio n. 3
0
tenant_id = osclients.get_session().get_project_id()
print 'Tenant id is: ' + tenant_id
print 'User id is: ' + osclients.get_session().get_user_id()
print 'User keypairs:'
print nova.get_user_keypairs()
print 'Tenant VMs:'
print nova.get_tenant_vms()
print 'Tenant security groups (nova):'
print nova.get_tenant_security_groups()

print 'Tenant images:'
print glance.get_tenant_images()

print 'Tenant volume snapshots:'
print cinder.get_tenant_volume_snapshots()

print 'Tenant volumes:'
print cinder.get_tenant_volumes()

print 'Tenant backup volumes:'
print cinder.get_tenant_backup_volumes()

print 'Tenant floating ips:'
print neutron.get_tenant_floatingips()
print 'Tenant networks:'
print neutron.get_tenant_networks()
print 'Tenant security groups (neutron):'
print neutron.get_tenant_securitygroups()
print 'Tenant routers:'
print neutron.get_tenant_routers()