Class: Tfrb::CLI
- Inherits:
-
Thor
- Object
- Thor
- Tfrb::CLI
- Defined in:
- lib/tfrb/cli.rb
Instance Method Summary collapse
- #__print_version ⇒ Object
- #apply ⇒ Object
- #import(resource_type, resource_name, resource_id) ⇒ Object
- #init ⇒ Object
- #plan ⇒ Object
- #statemv(from_resource_id, to_resource_id) ⇒ Object
- #unlock(lock_id) ⇒ Object
Instance Method Details
#__print_version ⇒ Object
11 12 13 |
# File 'lib/tfrb/cli.rb', line 11 def __print_version puts Tfrb::VERSION end |
#apply ⇒ Object
32 33 34 35 36 |
# File 'lib/tfrb/cli.rb', line 32 def apply tfrb = load_tfrb([:skip_import]) tfrb.apply!([:parallelism]) tfrb.clean! end |
#import(resource_type, resource_name, resource_id) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/tfrb/cli.rb', line 39 def import(resource_type, resource_name, resource_id) tfrb = load_tfrb tfrb.skip_import = false tfrb.import!(resource_type, resource_name, resource_id) tfrb.clean! end |
#init ⇒ Object
16 17 18 |
# File 'lib/tfrb/cli.rb', line 16 def init load_tfrb.init! end |
#plan ⇒ Object
23 24 25 26 27 |
# File 'lib/tfrb/cli.rb', line 23 def plan tfrb = load_tfrb([:skip_import], [:dry_run]) tfrb.plan! tfrb.clean! end |
#statemv(from_resource_id, to_resource_id) ⇒ Object
47 48 49 50 51 52 |
# File 'lib/tfrb/cli.rb', line 47 def statemv(from_resource_id, to_resource_id) tfrb = load_tfrb tfrb.skip_import = true tfrb.statemv!(from_resource_id, to_resource_id) tfrb.clean! end |
#unlock(lock_id) ⇒ Object
64 65 66 67 68 |
# File 'lib/tfrb/cli.rb', line 64 def unlock(lock_id) tfrb = load_tfrb tfrb.unlock!(lock_id) tfrb.clean! end |