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

comments on a Switch #23006

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

comments on a Switch #23006

wants to merge 1 commit into from

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Apr 26, 2024

Document how a switch relates to an ems

Some models use ems_id, others use HostVirtualSwitch

@agrare
Copy link
Member

agrare commented Apr 26, 2024

@kbrock Switch is just a base class for both HostVirtualSwitch and DistributedVirtualSwitch so I don't think we should say that ::Switch is a HostVirtualSwitch

Having a switch associate to the EMS through a host was the original way all of the switches worked

app/models/switch.rb Outdated Show resolved Hide resolved
@kbrock
Copy link
Member Author

kbrock commented Apr 26, 2024

update:

  • changed comment

Thanks.

@miq-bot
Copy link
Member

miq-bot commented Apr 26, 2024

Checked commit kbrock@a7e5f7a with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
1 file checked, 1 offense detected

app/models/switch.rb

@@ -3,6 +3,9 @@ class Switch < ApplicationRecord
include CustomActionsMixin
extend TenancyCommonMixin

# Note:
# DistributedVirtualSwitch, PhysicalSwitch references ems through Switch#ems_id
# HostVirtualSwitch references ems through HostVirtualSwitch
Copy link
Member

@agrare agrare Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# HostVirtualSwitch references ems through HostVirtualSwitch
# HostVirtualSwitch references ems through Host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants