bug 605. New method at fslocal for rename folders

Change-Id: Ic0acd82873a3790f228641ba676d2da9235059f1
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/osm_common/fslocal.py b/osm_common/fslocal.py
index 61600ec..bd243f0 100644
--- a/osm_common/fslocal.py
+++ b/osm_common/fslocal.py
@@ -63,6 +63,22 @@
         except Exception as e:
             raise FsException(str(e), http_code=HTTPStatus.INTERNAL_SERVER_ERROR)
 
+    def dir_rename(self, src, dst):
+        """
+        Rename one directory name. If dst exist, it replaces (deletes) existing directory
+        :param src: source directory
+        :param dst: destination directory
+        :return: None or raises and exception
+        """
+        try:
+            if os.path.exists(self.path + dst):
+                rmtree(self.path + dst)
+
+            os.rename(self.path + src, self.path + dst)
+
+        except Exception as e:
+            raise FsException(str(e), http_code=HTTPStatus.INTERNAL_SERVER_ERROR)
+
     def file_exists(self, storage, mode=None):
         """
         Indicates if "storage" file exist
@@ -143,7 +159,7 @@
 
     def file_delete(self, storage, ignore_non_exist=False):
         """
-        Delete storage content recursivelly
+        Delete storage content recursively
         :param storage: can be a str or list of str
         :param ignore_non_exist: not raise exception if storage does not exist
         :return: None