-
Notifications
You must be signed in to change notification settings - Fork 120
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
Adding Inspectme functionality into log_object embedded method. #386
Conversation
@miq-bot add_label enhancement |
Spec is still a work in progress .... |
7b98161
to
469bde6
Compare
@tinaafitz @mkanoor Please review |
@@ -42,6 +42,48 @@ def self.log(obj, object_string = 'Automation Object', handle = $evm) | |||
obj.attributes.sort.each { |k, v| handle.log("info", " Attribute - #{k}: #{v}") } | |||
handle.log("info", "Listing #{object_string} Attributes - End") | |||
end | |||
|
|||
def self.log_ar_objects(object_string = 'VMDB Object', handle = $evm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@billfitzgerald0120 I think instead of using object_string we should call it log_prefix.
469bde6
to
be9fe61
Compare
handle.log("info", "Listing #{log_prefix} Attributes - End") | ||
end | ||
|
||
def self.ar_object?(obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@billfitzgerald0120
can we change this whole method to
def self.ar_object?(obj)
obj.respond_to?(:object_class)
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkanoor The changes worked so I am updating PR. Thanks
Added the ability to log all attributes, associations, and tags. Inspectme is a great tool for debugging and now will be available from an embedded method. ManageIQ#350 Added tests Changed object_prefix to log_prefix as requested. Changed method to obj.respond_to?(:object_class) as requested.
be9fe61
to
3295adc
Compare
Checked commit billfitzgerald0120@3295adc with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@mkanoor Please review |
@billfitzgerald0120 Now that this code is merged are you working on updating the |
@gmcculloug I will work on updating the inspectme method. Still looking into where else we want to use the embedded methods to reduce code. |
Added the ability to log all attributes, associations, and tags.
Inspectme is a great tool for debugging and now will be available from an embedded method.
#350