]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs.service.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / cephfs.service.ts
index 02f31ca7b56b82ac45f899efe289aa7c9d28889e..6142d7359de26614225c8d2476dd1772f41d3e73 100644 (file)
@@ -73,4 +73,34 @@ export class CephfsService {
       params
     });
   }
+
+  create(name: string, serviceSpec: object) {
+    return this.http.post(
+      this.baseURL,
+      { name: name, service_spec: serviceSpec },
+      {
+        observe: 'response'
+      }
+    );
+  }
+
+  isCephFsPool(pool: any) {
+    return _.indexOf(pool.application_metadata, 'cephfs') !== -1 && !pool.pool_name.includes('/');
+  }
+
+  remove(name: string) {
+    return this.http.delete(`${this.baseURL}/remove/${name}`, {
+      observe: 'response'
+    });
+  }
+
+  rename(vol_name: string, new_vol_name: string) {
+    let requestBody = {
+      name: vol_name,
+      new_name: new_vol_name
+    };
+    return this.http.put(`${this.baseURL}/rename`, requestBody, {
+      observe: 'response'
+    });
+  }
 }