From 8c191cdb232d1e959fbb3e32e4683370490be5e3 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 26 Mar 2015 17:16:40 -0700 Subject: [PATCH] Add new commands stub, re-arrange options as below COMMANDS: make make attach attach disk detach detach disk heal heal donut rebalance rebalance mb mb cp cp help, h Shows a list of commands or help for one command --- donut-cmd-attachdisk.go | 27 ++++++++++++++++ donut-cmd-make.go | 2 +- donut-options.go | 72 +++++++++++++++++++++++------------------ 3 files changed, 69 insertions(+), 32 deletions(-) create mode 100644 donut-cmd-attachdisk.go diff --git a/donut-cmd-attachdisk.go b/donut-cmd-attachdisk.go new file mode 100644 index 00000000..0c2fc293 --- /dev/null +++ b/donut-cmd-attachdisk.go @@ -0,0 +1,27 @@ +/* + * Minimalist Object Storage, (C) 2015 Minio, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "github.com/minio-io/cli" +) + +func doAttachDiskCmd(c *cli.Context) { +} + +func doDetachDiskCmd(c *cli.Context) { +} diff --git a/donut-cmd-make.go b/donut-cmd-make.go index a3507f45..98252405 100644 --- a/donut-cmd-make.go +++ b/donut-cmd-make.go @@ -1,5 +1,5 @@ /* - * Minimalist Object Storage, (C) 2014,2015 Minio, Inc. + * Minimalist Object Storage, (C) 2015 Minio, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/donut-options.go b/donut-options.go index 35118e64..dd9901b1 100644 --- a/donut-options.go +++ b/donut-options.go @@ -1,35 +1,58 @@ +/* + * Minimalist Object Storage, (C) 2015 Minio, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package main import ( "github.com/minio-io/cli" ) -var healCmd = cli.Command{ - Name: "heal", - Usage: "heal donut", +var makeDonutCmd = cli.Command{ + Name: "make", + Usage: "make", Description: "", - Action: doHealCmd, + Action: doMakeDonutCmd, } -var attachCmd = cli.Command{ +var attachDiskCmd = cli.Command{ Name: "attach", Usage: "attach disk", Description: "", - Action: doAttachCmd, + Action: doAttachDiskCmd, } -var detachCmd = cli.Command{ +var detachDiskCmd = cli.Command{ Name: "detach", Usage: "detach disk", Description: "", - Action: doDetachCmd, + Action: doDetachDiskCmd, } -var rebalanceCmd = cli.Command{ +var healDonutCmd = cli.Command{ + Name: "heal", + Usage: "heal donut", + Description: "", + Action: doHealDonutCmd, +} + +var rebalanceDonutCmd = cli.Command{ Name: "rebalance", Usage: "rebalance ", Description: "", - Action: doRebalanceCmd, + Action: doRebalanceDonutCmd, } var cpDonutCmd = cli.Command{ @@ -46,31 +69,18 @@ var mbDonutCmd = cli.Command{ Action: doMakeDonutBucketCmd, } -var makeDonutCmd = cli.Command{ - Name: "make", - Usage: "make", - Description: "", - Action: doMakeDonutCmd, -} - var donutOptions = []cli.Command{ - healCmd, - attachCmd, - detachCmd, - rebalanceCmd, - cpDonutCmd, - mbDonutCmd, makeDonutCmd, + attachDiskCmd, + detachDiskCmd, + healDonutCmd, + rebalanceDonutCmd, + mbDonutCmd, + cpDonutCmd, } -func doHealCmd(c *cli.Context) { +func doHealDonutCmd(c *cli.Context) { } -func doAttachCmd(c *cli.Context) { -} - -func doDetachCmd(c *cli.Context) { -} - -func doRebalanceCmd(c *cli.Context) { +func doRebalanceDonutCmd(c *cli.Context) { }