module Morpheus::Cli::SecondaryRestCommand

SecondaryRestCommand is a mixin for Morpheus::Cli command classes. for resources that are secondary to some parent resource. Provides basic CRUD commands: list, get, add, update, remove The parent resource is specified as the first argument for all the comments.

Example of a SecondaryRestCommand for ‘morpheus load-balancer-virtual-servers`.

class Morpheus::Cli::LoadBalancerVirtualServers

include Morpheus::Cli::CliCommand
include Morpheus::Cli::RestCommand
include Morpheus::Cli::SecondaryRestCommand
include Morpheus::Cli::LoadBalancersHelper

set_command_name :'load-balancer-virtual-servers'
register_subcommands :list, :get, :add, :update, :remove

register_interfaces :load_balancer_virtual_servers,
                    :load_balancers, :load_balancer_types

set_rest_parent_name :load_balancers

end