morpheus-cli 5.3.2.1 → 5.3.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e27f28e852866d25457815c852eec19a3f65bd3b0ae8a33d8e055d990f631e79
4
- data.tar.gz: 5270f5c81e872491cbf9e1e59f33cf78bf233c152c1347fa61cb01c544073e34
3
+ metadata.gz: 727a18a73b2f9c5a7dbec90521cf690eccc5a36de5c90631b17ddc6e658befbf
4
+ data.tar.gz: 98faaa24be96fd839c85a9e3463881bb3f59ab10740244867a2290b880c83988
5
5
  SHA512:
6
- metadata.gz: 172818b1030b243ebb2c9c7e316b0cefe173b5a198ff8184f7c0b7bce275954e80109b45c426530ef1587635199e6cc17dedc248011cc11626e2d0f5e8f3f1c1
7
- data.tar.gz: 45bdeca37c208f7e7889bd9ab87b0012fea6623faf1b80628fef2ad0df55182388c8e1cd647f9fdd51628d48a4d6cca715e718bb655c8612683fe4ffc9ede3f8
6
+ metadata.gz: 654136bc313f445739d1665861e67831f95d5cddd138a9cf619f824cd78d2ce665f1332a0a09c73039850146adb30347830e935536331ab8941bd203b56d01c2
7
+ data.tar.gz: b63702230910bffae83a7784ad3385c92df5ef7df13b3cfb83d3cb59bb42e593f1a6dc6a2b65628aea928ced34772a8b7f45c7d6a33d2ae93eda22640e3695a3
data/Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
1
  FROM ruby:2.5.1
2
2
 
3
- RUN gem install morpheus-cli -v 5.3.2.1
3
+ RUN gem install morpheus-cli -v 5.3.2.2
4
4
 
5
5
  ENTRYPOINT ["morpheus"]
@@ -2592,17 +2592,18 @@ class Morpheus::Cli::Instances
2592
2592
  cloud_id = instance['cloud']['id']
2593
2593
  layout_id = instance['layout']['id']
2594
2594
  plan_id = instance['plan']['id']
2595
-
2595
+ current_plan_name = instance['plan']['name']
2596
2596
  # prompt for service plan
2597
2597
  service_plans_json = @instances_interface.service_plans({zoneId: cloud_id, siteId: group_id, layoutId: layout_id})
2598
2598
  service_plans = service_plans_json["plans"]
2599
2599
  service_plans_dropdown = service_plans.collect {|sp| {'name' => sp["name"], 'value' => sp["id"]} } # already sorted
2600
2600
  service_plans_dropdown.each do |plan|
2601
- if plan['value'] && plan['value'].to_i == plan_id.to_i
2602
- plan['name'] = "#{plan['name']} (current)"
2603
- end
2601
+ # if plan['value'] && plan['value'].to_i == plan_id.to_i
2602
+ # plan['name'] = "#{plan['name']} (current)"
2603
+ # current_plan_name = plan['name']
2604
+ # end
2604
2605
  end
2605
- plan_prompt = Morpheus::Cli::OptionTypes.prompt([{'fieldName' => 'servicePlan', 'type' => 'select', 'fieldLabel' => 'Plan', 'selectOptions' => service_plans_dropdown, 'required' => true, 'description' => 'Choose the appropriately sized plan for this instance'}],options[:options])
2606
+ plan_prompt = Morpheus::Cli::OptionTypes.prompt([{'fieldName' => 'servicePlan', 'type' => 'select', 'fieldLabel' => 'Plan', 'selectOptions' => service_plans_dropdown, 'required' => true, 'defaultValue' => current_plan_name, 'description' => 'Choose the appropriately sized plan for this instance'}],options[:options])
2606
2607
  service_plan = service_plans.find {|sp| sp["id"] == plan_prompt['servicePlan'].to_i }
2607
2608
  new_plan_id = service_plan["id"]
2608
2609
  #payload[:servicePlan] = new_plan_id # ew, this api uses servicePlanId instead
@@ -2622,7 +2623,8 @@ class Morpheus::Cli::Instances
2622
2623
  # for now, always do this
2623
2624
  payload["deleteOriginalVolumes"] = true
2624
2625
  end
2625
-
2626
+ payload.delete("rootVolume")
2627
+ (1..20).each {|i| payload.delete("dataVolume#{i}") }
2626
2628
  @instances_interface.setopts(options)
2627
2629
  if options[:dry_run]
2628
2630
  print_dry_run @instances_interface.dry.resize(instance['id'], payload)
@@ -1331,7 +1331,7 @@ module Morpheus::Cli::ProvisioningHelper
1331
1331
  volume_action = 'keep'
1332
1332
  else
1333
1333
  action_options = [{'name' => 'Modify', 'value' => 'modify'}, {'name' => 'Keep', 'value' => 'keep'}, {'name' => 'Delete', 'value' => 'delete'}]
1334
- v_prompt = Morpheus::Cli::OptionTypes.prompt([{'fieldContext' => field_context, 'fieldName' => 'action', 'type' => 'select', 'fieldLabel' => "Modify/Keep/Delete volume '#{current_volume['name']}'", 'selectOptions' => action_options, 'required' => true, 'description' => 'Modify, Keep or Delete existing data volume?'}], options[:options])
1334
+ v_prompt = Morpheus::Cli::OptionTypes.prompt([{'fieldContext' => field_context, 'fieldName' => 'action', 'type' => 'select', 'fieldLabel' => "Modify/Keep/Delete volume '#{current_volume['name']}'", 'selectOptions' => action_options, 'required' => true, 'defaultValue' => 'keep', 'description' => 'Modify, Keep or Delete existing data volume?'}], options[:options])
1335
1335
  volume_action = v_prompt[field_context]['action']
1336
1336
  end
1337
1337
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Morpheus
3
3
  module Cli
4
- VERSION = "5.3.2.1"
4
+ VERSION = "5.3.2.2"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morpheus-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.2.1
4
+ version: 5.3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Estes
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-08-11 00:00:00.000000000 Z
14
+ date: 2021-09-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler