From d420a8b6f1fecde3983369b131da1f042c7c8a14 Mon Sep 17 00:00:00 2001 From: Adam Israel Date: Tue, 9 Apr 2019 16:07:53 -0400 Subject: [PATCH] Fix bug 659: Don't use static member variables This fixes bug 659, where static member variables were used by the VCAMonitor, causing unexpected behaviour when deploying and destroying a network service multiple times. Change-Id: Icc5e4da62aeb11e4c89ba3cf5f148c6959acf7e3 Signed-off-by: Adam Israel --- n2vc/vnf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/n2vc/vnf.py b/n2vc/vnf.py index 1bdfe2f..a486f27 100644 --- a/n2vc/vnf.py +++ b/n2vc/vnf.py @@ -57,13 +57,12 @@ logging.getLogger('juju.machine').setLevel(logging.WARN) class VCAMonitor(ModelObserver): """Monitor state changes within the Juju Model.""" log = None - ns_name = None - applications = {} def __init__(self, ns_name): self.log = logging.getLogger(__name__) self.ns_name = ns_name + self.applications = {} def AddApplication(self, application_name, callback, *callback_args): if application_name not in self.applications: -- 2.25.1