remove ceph osd pipeline - fix partition removal while using nvme drives

Change-Id: I8fd217e7bb2a573c3482e99769e587d0a5cf9a8f
Related-Prod: PROD-32481
diff --git a/ceph-remove-osd.groovy b/ceph-remove-osd.groovy
index 169bbd0..66e9422 100644
--- a/ceph-remove-osd.groovy
+++ b/ceph-remove-osd.groovy
@@ -56,10 +56,14 @@
         }
     }
     if (partition?.trim()) {
-        // dev = /dev/sdi
+        def part_id
+        if (partition.contains("nvme")) {
+          part_id = partition.substring(partition.lastIndexOf("p")+1).replaceAll("[^0-9]+", "")
+        }
+        else {
+          part_id = partition.substring(partition.lastIndexOf("/")+1).replaceAll("[^0-9]+", "")
+        }
         def dev = partition.replaceAll('\\d+$', "")
-        // part_id = 2
-        def part_id = partition.substring(partition.lastIndexOf("/")+1).replaceAll("[^0-9]+", "")
         runCephCommand(master, target, "Ignore | parted ${dev} rm ${part_id}")
     }
     return