Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete LifecycleEvent and table #21204

Open
3 of 7 tasks
Tracked by #21377
jrafanie opened this issue May 3, 2021 · 4 comments
Open
3 of 7 tasks
Tracked by #21377

Delete LifecycleEvent and table #21204

jrafanie opened this issue May 3, 2021 · 4 comments

Comments

@jrafanie
Copy link
Member

jrafanie commented May 3, 2021

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',
@jrafanie jrafanie self-assigned this May 3, 2021
jrafanie added a commit to jrafanie/manageiq that referenced this issue May 3, 2021
This was added back in 2008 in commit d866a691c57073d44d24eba284f962e62f87a706
and isn't used.  It was never reportable but was available in the API.

Part of ManageIQ#21204
jrafanie added a commit to jrafanie/manageiq that referenced this issue Jun 17, 2021
This was added back in 2008 in commit d866a691c57073d44d24eba284f962e62f87a706
and isn't used.  It was never reportable but was available in the API.

Part of ManageIQ#21204
jrafanie added a commit to jrafanie/manageiq that referenced this issue Sep 9, 2021
This was added back in 2008 in commit d866a691c57073d44d24eba284f962e62f87a706
and isn't used.  It was never reportable but was available in the API.

Part of ManageIQ#21204
jrafanie added a commit to jrafanie/manageiq-schema that referenced this issue Sep 9, 2021
This was added back in 2008 in commit d866a691c57073d44d24eba284f962e62f87a706
and isn't used.  It was never reportable but was available in the API.

Part of ManageIQ/manageiq#21204
@miq-bot miq-bot added the stale label Feb 27, 2023
@miq-bot
Copy link
Member

miq-bot commented Feb 27, 2023

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
Copy link
Member

miq-bot commented Oct 23, 2023

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
Copy link
Member

miq-bot commented Jan 29, 2024

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.

1 similar comment
@miq-bot
Copy link
Member

miq-bot commented Jul 22, 2024

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.

@jrafanie jrafanie added pinned and removed stale labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants