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

fixes #9882 - in case of creation of compute resource without compute profile, show relevant error message #2262

Closed
wants to merge 1 commit into from

Conversation

unorthodoxgeek
Copy link
Member

No description provided.

@domcleal
Copy link
Contributor

This fixes a different issue to #9144 as the ticket description shows it has both a compute profile and attributes - it's probably a dupe of something already fixed. It'd be best to describe what this changes on a new ticket.

@unorthodoxgeek unorthodoxgeek changed the title fixes #9144 - in case of creation of compute resource without compute profile, show relevant error message fixes #9882 - in case of creation of compute resource without compute profile, show relevant error message Mar 24, 2015
@domcleal
Copy link
Contributor

Thanks, though I've fixed the description on the new issue, it said exactly the same as the last one.

@@ -138,6 +141,15 @@ def inheriting_mac

protected

def compute_resource_requires_fields
if mac.blank? && (managed? && host && host.managed? && !host.compute? &&!virtual?)
Copy link
Member

Choose a reason for hiding this comment

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

Can't these conditions go in the validation declaration itself above? At the validates :mac declaration I mean, it looks to me like we're checking almost the same condition twice.

@ohadlevy
Copy link
Member

ohadlevy commented May 7, 2015

@ping ?

@lzap
Copy link
Member

lzap commented May 18, 2015

What is the status? I think a beta customer hit this.

@@ -148,6 +151,13 @@ def host_managed?

protected

def compute_resource_requires_fields
if host.compute_resource.present?
host.errors.add(:compute_profile, _("you must specify either compute attributes or a compute profile"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Best not to use the second person here, just use a fragment so the full sentence makes more sense, e.g. :compute_attributes, _("is required, or use a compute profile") (and changed the target since the error is about attributes, a profile is a helper.)

…ut compute profile, show relevant error message
@ares
Copy link
Member

ares commented Sep 4, 2015

I checked the issue that this PR tries to address and it's not reproducible since the big networking change, we changed the way how we load the mac. The related BZ is caused by something else than interface validation. I recommend closing this PR (will update all issues as well).

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