Module: Chef::Knife::KeyCreateBase
- Included in:
- ClientKeyCreate, UserKeyCreate
- Defined in:
- lib/chef/knife/key_create_base.rb
Overview
Extendable module that class_eval’s common options into UserKeyCreate and ClientKeyCreate
Class Method Summary collapse
Class Method Details
.included(includer) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/chef/knife/key_create_base.rb', line 25 def self.included(includer) includer.class_eval do option :public_key, short: "-p FILENAME", long: "--public-key FILENAME", description: "Public key for newly created key. If not passed, the server will create a key pair for you, but you must pass --key-name NAME in that case." option :file, short: "-f FILE", long: "--file FILE", description: "Write the private key to a file, if you requested the server to create one." option :key_name, short: "-k NAME", long: "--key-name NAME", description: "The name for your key. If you do not pass a name, you must pass --public-key, and the name will default to the fingerprint of the public key passed." option :expiration_date, short: "-e DATE", long: "--expiration-date DATE", description: "Optionally pass the expiration date for the key in ISO 8601 fomatted string: YYYY-MM-DDTHH:MM:SSZ e.g. 2013-12-24T21:00:00Z. Defaults to infinity if not passed. UTC timezone assumed." end end |