Sha256: 7ed047f24ee68cb9894230474c5987d2fde61eccf2a81083e5f97d823457d202
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
$options = Trollop::options do banner <<-EOS #{File.read('README')} Options: EOS opt :url, "Base url of ESOD service", :required => true, :type => :string opt :resource, "Resource to retrieve (ex: server)", :type => :string opt :id, "Id of resource to retrieve (ex: 12345)", :type => :string opt :resource_path, "Full resource path (instead of resource & id, ex: server/12345)", :type => :string opt :property, "Property of the resource, dotted notation (ex: vm_configuration_parameters.first.name)", :type => :string, :required => false opt :api_token, "User authentication token", :type => :string, :required => true end if $options[:resource] || $options[:id] Trollop::die :resource_path, "cannot be specified if --resource and --id options are used. Use either --resource-path OR --resource and --id." elsif $options[:resource_path] if $options[:resource] || $options[:id] Trollop::die :resource, "cannot be specified if --resource-path option is used. Use either --resource-path OR --resource and --id." end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
esod-client-0.2.1 | command_line_options.rb |