Gitiles
Code Review
Sign In
gerrit.opencord.org
/
xos
/
b5885408f6b047c714c015c5f6a36e1a692e88d7
/
.
/
planetstack
/
observer
/
deleters
/
site_deleter.py
blob: bb29c9487ee25381dc91649e3fd5c3e6192dc805 [
file
] [
log
] [
blame
]
from
core
.
models
import
Site
from
observer
.
delete
import
Deleter
class
SiteDeleter
(
Deleter
):
model
=
'Site'
def
call
(
self
,
pk
):
site
=
Site
.
objects
.
get
(
pk
=
pk
)
if
site
.
tenant_id
:
self
.
driver
.
delete_tenant
(
site
.
tenant_id
)
site
.
delete
()