lib/vmc/cli/start/target.rb in vmc-0.5.1.rc6 vs lib/vmc/cli/start/target.rb in vmc-0.5.1

- old
+ new

@@ -1,10 +1,12 @@ require "vmc/cli/start/base" require "vmc/cli/start/target_interactions" module VMC::Start class Target < Base + def precondition; end + desc "Set or display the target cloud, organization, and space" group :start input :url, :desc => "Target URL to switch to", :argument => :optional input :organization, :desc => "Organization" , :aliases => %w{--org -o}, :from_given => by_name(:organization) @@ -32,26 +34,13 @@ set_target(target) end end - return unless v2? && client.logged_in? - - if input.has?(:organization) || input.has?(:space) - info = target_info - - select_org_and_space(input, info) - - save_target_info(info) + if v2? + puts "Warning: Targeting a v2 instance. Further commands will fail until a v1 instance is targeted. Please use the 'cf' command to target v2 instances." end - return if quiet? - - invalidate_client - - line - display_target - display_org_and_space end private def display_org_and_space