ManageIQ / manageiq

ManageIQ Open-Source Management Platform
https://manageiq.org
Apache License 2.0
1.35k stars 900 forks source link

Delete LifecycleEvent and table #21204

Open jrafanie opened 3 years ago

jrafanie commented 3 years ago

Related to #19723

This was added back in 2008 in commit d866a691c57073d44d24eba284f962e62f87a706 for the old soap based api and isn't used.

joerafaniello@Joes-MBP-2 manageiq % rg -M 100 "LifecycleEvent|lifecycle_event" ./ `gem env home`

Should be removed after generating message catalogs:

./locale/ja/manageiq.po
23397:msgid "LifecycleEvent|Created by"
...

./locale/ko/manageiq.po
23397:msgid "LifecycleEvent|Created by"
...

./locale/manageiq.pot
23774:msgid "LifecycleEvent|Created by"
...

./locale/en/manageiq.po
23774:msgid "LifecycleEvent|Created by"
...

./locale/fr/manageiq.po
23608:msgid "LifecycleEvent|Created by"
...

./locale/es/manageiq.po
23608:msgid "LifecycleEvent|Created by"
...

./locale/de/manageiq.po
23608:msgid "LifecycleEvent|Created by"
...

./locale/it/manageiq.po
23608:msgid "LifecycleEvent|Created by"
...

./locale/zh_TW/manageiq.po
23397:msgid "LifecycleEvent|Created by"
...

./locale/zh_CN/manageiq.po
23397:msgid "LifecycleEvent|Created by"
...

./locale/pt_BR/manageiq.po
23608:msgid "LifecycleEvent|Created by"
...

CORE TODO:

./app/models/vm_or_template.rb
103:  has_many                  :lifecycle_events,  :class_name => "LifecycleEvent"

./app/models/lifecycle_event.rb
1:class LifecycleEvent < ApplicationRecord
11:    event = LifecycleEvent.new(event_hash)
16:      vm.lifecycle_events << event unless vm.lifecycle_events.include?(event)

./product/alerts/rss/lifecycle_events.yml
5:feed_link: "/alert/rss?feed=lifecycle_events"
18:item_class: LifecycleEvent

Should be removed after generating message catalogs:

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-efa074ab6d99/app/javascript/oldjs/locale/de.json
1:[Omitted long line with 10 matches]

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-efa074ab6d99/app/javascript/oldjs/locale/pt_BR.json
1:[Omitted long line with 20 matches]

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-efa074ab6d99/app/javascript/oldjs/locale/fr.json
1:[Omitted long line with 10 matches]

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-efa074ab6d99/app/javascript/oldjs/locale/zh_TW.json
1:[Omitted long line with 10 matches]

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-efa074ab6d99/app/javascript/oldjs/locale/ko.json
1:[Omitted long line with 20 matches]

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-efa074ab6d99/app/javascript/oldjs/locale/es.json
1:[Omitted long line with 11 matches]

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-efa074ab6d99/app/javascript/oldjs/locale/it.json
1:[Omitted long line with 10 matches]

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-efa074ab6d99/app/javascript/oldjs/locale/en.json
1:[Omitted long line with 10 matches]

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-efa074ab6d99/app/javascript/oldjs/locale/ja.json
1:[Omitted long line with 10 matches]

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-ui-classic-efa074ab6d99/app/javascript/oldjs/locale/zh_CN.json
1:[Omitted long line with 10 matches]

Drop table schema change TODO:

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-schema-e78847a8582b/db/migrate/20130923182042_collapsed_initial_migration.rb
929:    create_table "lifecycle_events" do |t|
940:[Omitted long line with 2 matches]
941:    add_index "lifecycle_events", ["vm_or_template_id"], :name => "index_lifecycle_events_on_vm_id"
3440:    drop_table "lifecycle_events"

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-schema-e78847a8582b/spec/support/table_list.txt
137:lifecycle_events

Drop from API TODO:

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-api-050a9774ff09/spec/requests/vms_spec.rb
1211:  context "Vm add_lifecycle_event action" do
1218:    it "add_lifecycle_event to an invalid vm" do
1219:      api_basic_authorize action_identifier(:vms, :add_lifecycle_event)
1221:      post(invalid_vm_url, :params => gen_request(:add_lifecycle_event, :event => "event 1"))
1226:    it "add_lifecycle_event without appropriate action role" do
1229:      post(vm_url, :params => gen_request(:add_lifecycle_event, :event => "event 1"))
1234:    it "add_lifecycle_event to a vm" do
1235:      api_basic_authorize action_identifier(:vms, :add_lifecycle_event)
1237:      post(vm_url, :params => gen_request(:add_lifecycle_event, events[0]))
1240:      expect(vm.lifecycle_events.size).to eq(1)
1241:      expect(vm.lifecycle_events.first.event).to eq(events[0][:event])
1244:    it "add_lifecycle_event to multiple vms" do
1245:      api_basic_authorize action_identifier(:vms, :add_lifecycle_event)
1247:      post(api_vms_url, :params => gen_request(:add_lifecycle_event,
1251:      expect(vm.lifecycle_events.size).to eq(events.size)
1252:      expect(vm.lifecycle_events.collect(&:event)).to match_array(events.collect { |e| e[:event] })

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-api-050a9774ff09/config/api.yml
4716:      - :name: add_lifecycle_event
4794:      - :name: add_lifecycle_event

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-api-050a9774ff09/app/controllers/api/vms_controller.rb
140:    def add_lifecycle_event_resource(type, id = nil, data = nil)
147:        add_lifecycle_event_vm(vm, lifecycle_event_from_data(data))
451:    def add_lifecycle_event_vm(vm, lifecycle_event)
452:[Omitted long line with 2 matches]
453:      event = LifecycleEvent.create_event(vm, lifecycle_event)
459:    def lifecycle_event_from_data(data)

Related... API has it documented: http://manageiq.org/docs/reference/euwe/api/examples/add_lifecycle_event_vm

???

/Users/joerafaniello/.gem/ruby/2.6.6/bundler/gems/manageiq-v2v-581bb6a6e2fa/app/javascript/react/screens/App/Plan/plan.vms.fixtures.js
87:      name: 'add_lifecycle_event',
miq-bot commented 1 year ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

miq-bot commented 1 year ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

miq-bot commented 10 months ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

miq-bot commented 4 months ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.