2016-11-05 17:09:05 -07:00
|
|
|
/*
|
|
|
|
|
Copyright 2016 The Rook Authors. All rights reserved.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
*/
|
2016-12-01 16:10:46 -08:00
|
|
|
package block
|
2016-09-30 12:56:56 -07:00
|
|
|
|
2016-11-16 19:53:33 -08:00
|
|
|
import (
|
|
|
|
|
"runtime"
|
|
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
)
|
2016-09-30 12:56:56 -07:00
|
|
|
|
2016-12-01 16:10:46 -08:00
|
|
|
var Cmd = &cobra.Command{
|
2016-09-30 12:56:56 -07:00
|
|
|
Use: "block",
|
|
|
|
|
Short: "Performs commands and operations on block devices and images in the cluster",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
2016-12-01 16:10:46 -08:00
|
|
|
Cmd.AddCommand(listCmd)
|
|
|
|
|
Cmd.AddCommand(createCmd)
|
2017-03-20 21:38:03 -07:00
|
|
|
Cmd.AddCommand(deleteCmd)
|
2016-11-16 19:53:33 -08:00
|
|
|
|
|
|
|
|
if runtime.GOOS == "linux" {
|
2017-03-23 16:09:17 -07:00
|
|
|
Cmd.AddCommand(mapCmd)
|
|
|
|
|
Cmd.AddCommand(unmapCmd)
|
2016-11-16 19:53:33 -08:00
|
|
|
}
|
2016-09-30 12:56:56 -07:00
|
|
|
}
|