Acess DRB remote object


#1

Hello again!

I’m trying to add custom attributes to a ‘ext_management_system’ (provider) service model object.
I have found that this specific drb object doesnt have the method ‘custom_set’ which is the method I used for adding custom attributes to a ‘vm’ service model object.

I found that both vm and provider remote-objects have the method miq_cutom_set (which is the method for adding custom attributes). If I could access the provider remote-object I could use this method to add custom attributes right?

So I need help to access the provider remote object.

thanks (:


#2

Unfortunately the active record objects are designed to be inaccessible from an automate method (to stop us breaking things). The service model object is the read-only “sandpit” copy of the AR object that we’re given to play with, but in some cases, as you’ve discovered, this doesn’t replicate all of the corresponding AR functionality to automate.

The line include CustomAttributeMixin seems to be new in the Euwe version of the ExtManagementSystem AR model. It would seem perfectly valid to be able to access this functionality from the MiqAeServiceExtManagementSystem service model, maybe it’s an accidental omission. Do you feel like submitting a PR?

pemcg


#3

@Or_Granit - Created https://github.com/ManageIQ/manageiq/pull/12602 to expose the custom attribute methods on the ext_management_system model.


#4

@pemcg @gmccullough Thank you guys!