Srikanth Vavilapalli | b2a5019 | 2017-02-03 18:25:59 +0000 | [diff] [blame] | 1 | import os |
| 2 | import sys |
| 3 | sys.path.append("/opt/xos") |
| 4 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings") |
| 5 | import django |
| 6 | from core.models import * |
| 7 | #from services.exampleservice.models import * |
| 8 | from services.monitoring.models import * |
| 9 | django.setup() |
| 10 | |
| 11 | for o in CeilometerService.get_service_objects().all(): |
| 12 | print "Delete", o |
| 13 | o.delete() |
| 14 | |
| 15 | print "wait for perma-deletion" |
| 16 | |
| 17 | while MonitoringChannel.deleted_objects.all().exists() or CeilometerService.deleted_objects.all().exists(): |
| 18 | pass |