// 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 command import ( "fmt" "log" "github.com/hashicorp/consul/api" "github.com/jwaldrip/odin/cli" ) var Role = cli.NewSubCommand("role", "Role operations", roleRun) func init() { Role.DefineParams("action") Role.SetLongDescription(` Interact with cascade roles Actions (current node only): list - list roles set <roles> - set roles `) } func roleRun(c cli.Command) { switch c.Param("action").String() {
package command import ( "fmt" "log" "os" "os/signal" "github.com/hashicorp/consul/api" "github.com/jwaldrip/odin/cli" "github.com/boundary/cascade/roll" ) var Cm = cli.NewSubCommand("cm", "Config management operations", cmRun) func init() { Cm.DefineParams("action") Cm.DefineStringFlag("role", "", "filter by role") Cm.AliasFlag('r', "role") Cm.SetLongDescription(` Run CM on member systems Actions: roll - ordered synchronous run local - run CM locally only single <nodename> - run on single remote node `) }
// See the License for the specific language governing permissions and // limitations under the License. package command import ( "fmt" "log" "sort" "strings" "github.com/hashicorp/consul/api" "github.com/jwaldrip/odin/cli" ) var Service = cli.NewSubCommand("service", "Service operations", serviceRun) func init() { Service.DefineParams("action") Service.DefineStringFlag("type", "", "filter by type") Service.AliasFlag('t', "type") Service.SetLongDescription(` Interact with cascade services Actions: list - list registered services local - list services on current node find <servicename> - list nodes with service `) }
// 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 command import ( "fmt" "log" "github.com/hashicorp/consul/api" "github.com/jwaldrip/odin/cli" ) var Node = cli.NewSubCommand("node", "Node operations", nodeRun) func init() { Node.DefineParams("action") Node.DefineStringFlag("role", "", "filter by role") Node.AliasFlag('r', "role") Node.SetLongDescription(` Interact with cascade nodes Actions: list - list nodes `) } func nodeRun(c cli.Command) {