From bf49e8b94910505322a9f4a3ff3bdfdb5a59bb21 Mon Sep 17 00:00:00 2001
From: Mohamed Larabi <mohamed.larabi@inria.fr>
Date: Thu, 21 Nov 2013 14:32:25 +0100
Subject: [PATCH] check/set slice url and description when creating a new slice

---
 sfa/planetlab/pldriver.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sfa/planetlab/pldriver.py b/sfa/planetlab/pldriver.py
index 0978a576..d742394d 100644
--- a/sfa/planetlab/pldriver.py
+++ b/sfa/planetlab/pldriver.py
@@ -126,6 +126,10 @@ class PlDriver (Driver):
                     pl_record.pop(key)
             slices = self.shell.GetSlices([pl_record['name']])
             if not slices:
+                 if not pl_record.get('url', None) or not pl_record.get('description', None):
+                     pl_record['url'] = hrn
+                     pl_record['description'] = hrn
+
                  pointer = self.shell.AddSlice(pl_record)
                  self.shell.SetSliceHrn(int(pointer), hrn)
             else:
-- 
2.47.0