new --force option for xxx-delete commands in sol005 client
[osm/osmclient.git] / osmclient / sol005 / vnfd.py
index dd12096..c903f93 100644 (file)
@@ -89,9 +89,13 @@ class Vnfd(object):
     def get_artifact(self, name, artifact, filename):
         self.get_thing(name, 'artifacts/{}'.format(artifact), filename)
 
-    def delete(self, name):
+    def delete(self, name, force=False):
         vnfd = self.get(name)
-        http_code, resp = self._http.delete_cmd('{}/{}'.format(self._apiBase,vnfd['_id']))
+        querystring = ''
+        if force:
+            querystring = '?FORCE=True'
+        http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
+                                         vnfd['_id'], querystring))
         if resp:
             resp = json.loads(resp)
         #print 'RESP: {}'.format(resp)