morpheus-cli 0.9.5 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/morpheus/cli/hosts.rb +2 -2
- data/lib/morpheus/cli/remote.rb +2 -1
- data/lib/morpheus/cli/shell.rb +4 -1
- data/lib/morpheus/cli/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 225abeec72be29393b66192db842883e5a6a0260
         | 
| 4 | 
            +
              data.tar.gz: ddcee03ffae03cc3ade5f42d727bda5da4481e14
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 5396e4da45c594a30ead62e81349439edafff63faaeae9a1b11cd18d684973d313487c4a67193389c461d877ef6c4e2c0cd2d94a40aa3e04d2834e5dfcaa2bc7
         | 
| 7 | 
            +
              data.tar.gz: 06b4067301d92403d0190c2290cbf02a99f1c4707a142c5162a508a3372417c060feb8ef0eafdfc25c3159e1c5c885688ad0b45e2329c96c769341d8e26ca0d4
         | 
    
        data/lib/morpheus/cli/hosts.rb
    CHANGED
    
    | @@ -40,7 +40,7 @@ class Morpheus::Cli::Hosts | |
| 40 40 |  | 
| 41 41 | 
             
            	def handle(args) 
         | 
| 42 42 | 
             
            		if args.empty?
         | 
| 43 | 
            -
            			puts "\nUsage: morpheus hosts [list,add,remove,logs,start,stop,run-workflow,make-managed,upgrade-agent] [name]\n\n"
         | 
| 43 | 
            +
            			puts "\nUsage: morpheus hosts [list,add,remove,logs,start,stop,run-workflow,make-managed,upgrade-agent, server-types] [name]\n\n"
         | 
| 44 44 | 
             
            			exit 1
         | 
| 45 45 | 
             
            		end
         | 
| 46 46 |  | 
| @@ -64,7 +64,7 @@ class Morpheus::Cli::Hosts | |
| 64 64 | 
             
            			when 'server-types'
         | 
| 65 65 | 
             
            				server_types(args[1..-1])
         | 
| 66 66 | 
             
            			else
         | 
| 67 | 
            -
            				puts "\nUsage: morpheus hosts [list,add,remove,logs,start,stop,run-workflow,make-managed,upgrade-agent] [name]\n\n"
         | 
| 67 | 
            +
            				puts "\nUsage: morpheus hosts [list,add,remove,logs,start,stop,run-workflow,make-managed,upgrade-agent, server-types] [name]\n\n"
         | 
| 68 68 | 
             
            				exit 127 #Command now foud exit code
         | 
| 69 69 | 
             
            		end
         | 
| 70 70 | 
             
            	end
         | 
    
        data/lib/morpheus/cli/remote.rb
    CHANGED
    
    | @@ -113,6 +113,7 @@ class Morpheus::Cli::Remote | |
| 113 113 | 
             
            		end
         | 
| 114 114 | 
             
            		::Morpheus::Cli::Remote.save_appliances(@appliances)
         | 
| 115 115 | 
             
            		list([])
         | 
| 116 | 
            +
            		@@appliance = nil
         | 
| 116 117 | 
             
            	end
         | 
| 117 118 |  | 
| 118 119 | 
             
            	def set_active_appliance(name)
         | 
| @@ -127,7 +128,7 @@ class Morpheus::Cli::Remote | |
| 127 128 |  | 
| 128 129 | 
             
            	# Provides the current active appliance url information
         | 
| 129 130 | 
             
            	def self.active_appliance
         | 
| 130 | 
            -
            		if !defined?(@@appliance)
         | 
| 131 | 
            +
            		if !defined?(@@appliance) || @@appliance.nil?
         | 
| 131 132 | 
             
            			@@appliance = load_appliance_file.select { |k,v| v[:active] == true}
         | 
| 132 133 | 
             
            		end
         | 
| 133 134 | 
             
            		return @@appliance.keys[0], @@appliance[@@appliance.keys[0]][:host]
         | 
    
        data/lib/morpheus/cli/shell.rb
    CHANGED
    
    | @@ -38,6 +38,7 @@ class Morpheus::Cli::Shell | |
| 38 38 | 
             
            		optparse.parse(args)
         | 
| 39 39 |  | 
| 40 40 | 
             
            		history = []
         | 
| 41 | 
            +
            		remote_handler = Morpheus::Cli::Remote.new()
         | 
| 41 42 | 
             
            		exit = false
         | 
| 42 43 | 
             
            		while !exit do
         | 
| 43 44 | 
             
            			print cyan,"morpheus > ",reset
         | 
| @@ -73,7 +74,9 @@ class Morpheus::Cli::Shell | |
| 73 74 | 
             
            							argv.push "--nocolor"
         | 
| 74 75 | 
             
            						end
         | 
| 75 76 | 
             
            						#puts "cmd: #{argv.join(' ')}"
         | 
| 76 | 
            -
            						if  | 
| 77 | 
            +
            						if argv[0] == 'remote'
         | 
| 78 | 
            +
            							remote_handler.handle(argv[1..-1])
         | 
| 79 | 
            +
            						elsif Morpheus::Cli::CliRegistry.has_command?(argv[0])
         | 
| 77 80 | 
             
            							Morpheus::Cli::CliRegistry.exec(argv[0], argv[1..-1])
         | 
| 78 81 | 
             
            						else
         | 
| 79 82 | 
             
            							puts "Unrecognized Command."
         | 
    
        data/lib/morpheus/cli/version.rb
    CHANGED