add support for removing single osd

Change-Id: I436537aaf2eb5f6a8e1428e7b8006fc3ebd5df09
diff --git a/ceph-remove-osd.groovy b/ceph-remove-osd.groovy
index b171855..1e62bb2 100644
--- a/ceph-remove-osd.groovy
+++ b/ceph-remove-osd.groovy
@@ -19,6 +19,7 @@
 // configure global variables
 def saltMaster
 def flags = CLUSTER_FLAGS.tokenize(',')
+def osds = OSD.tokenize(',')
 
 def runCephCommand(master, cmd) {
     return salt.cmdRun(master, ADMIN_HOST, cmd)
@@ -44,7 +45,10 @@
     def osd_ids = []
 
     for (i in pillar_disks.keySet()) {
-        osd_ids.add('osd.' + (hostname_id + i).toInteger())
+        def osd_id = (hostname_id + i).toInteger()
+        if (osd_id in osds) {
+            osd_ids.add('osd.' + osd_id)
+        }
     }
 
     // `ceph osd out <id> <id>`