Correct way to run internal actions from commands

Hi all, Thanks to the collaboration of some of the maintainers and others I have managed to merge a patch which gives the ability to run internal commands the following way: If you're writing a code in a class that extends CommandBase, please follow the following instructions: Instead of Backend.getInstance().runInternalAction (or MultipleActions) you should use runInternalAction More patches will be added for running internal queries , and probably endAction as well. Thanks, Yair

We should enforce that in code level: getBackend() should be private in CommandBase, and won't need any convention. Thanks, Gilad. ----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs@redhat.com> To: devel@ovirt.org Sent: Wednesday, June 18, 2014 8:44:41 AM Subject: [ovirt-devel] Correct way to run internal actions from commands
Hi all, Thanks to the collaboration of some of the maintainers and others I have managed to merge a patch which gives the ability to run internal commands the following way:
If you're writing a code in a class that extends CommandBase, please follow the following instructions:
Instead of Backend.getInstance().runInternalAction (or MultipleActions) you should use
runInternalAction
More patches will be added for running internal queries , and probably endAction as well.
Thanks, Yair
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "Yair Zaslavsky" <yzaslavs@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:14:35 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
We should enforce that in code level: getBackend() should be private in CommandBase, and won't need any convention.
Using getBackend() is also a "convention".
Thanks, Gilad.
----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs@redhat.com> To: devel@ovirt.org Sent: Wednesday, June 18, 2014 8:44:41 AM Subject: [ovirt-devel] Correct way to run internal actions from commands
Hi all, Thanks to the collaboration of some of the maintainers and others I have managed to merge a patch which gives the ability to run internal commands the following way:
If you're writing a code in a class that extends CommandBase, please follow the following instructions:
Instead of Backend.getInstance().runInternalAction (or MultipleActions) you should use
runInternalAction
More patches will be added for running internal queries , and probably endAction as well.
Thanks, Yair
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs@redhat.com> To: "Gilad Chaplik" <gchaplik@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:22:49 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "Yair Zaslavsky" <yzaslavs@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:14:35 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
We should enforce that in code level: getBackend() should be private in CommandBase, and won't need any convention.
Using getBackend() is also a "convention".
Btw, Backend, besides giving you the @PostConstruct method, does not give you a great deal (ok, give you some way to "remote lookup" stuff, but i'm talking from engine perspective). Who knows, maybe in the future we will be able to abolish it :) Not sure if the fact it exposes running internal commands via its interface is such a great thing.
Thanks, Gilad.
----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs@redhat.com> To: devel@ovirt.org Sent: Wednesday, June 18, 2014 8:44:41 AM Subject: [ovirt-devel] Correct way to run internal actions from commands
Hi all, Thanks to the collaboration of some of the maintainers and others I have managed to merge a patch which gives the ability to run internal commands the following way:
If you're writing a code in a class that extends CommandBase, please follow the following instructions:
Instead of Backend.getInstance().runInternalAction (or MultipleActions) you should use
runInternalAction
More patches will be added for running internal queries , and probably endAction as well.
Thanks, Yair
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs@redhat.com> To: "Gilad Chaplik" <gchaplik@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:22:49 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "Yair Zaslavsky" <yzaslavs@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:14:35 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
We should enforce that in code level: getBackend() should be private in CommandBase, and won't need any convention.
Using getBackend() is also a "convention".
so you're adding another one :-) how should I enforce not using getBackend().runXXX in reviews? I've probably need to remember your email...
Thanks, Gilad.
----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs@redhat.com> To: devel@ovirt.org Sent: Wednesday, June 18, 2014 8:44:41 AM Subject: [ovirt-devel] Correct way to run internal actions from commands
Hi all, Thanks to the collaboration of some of the maintainers and others I have managed to merge a patch which gives the ability to run internal commands the following way:
If you're writing a code in a class that extends CommandBase, please follow the following instructions:
Instead of Backend.getInstance().runInternalAction (or MultipleActions) you should use
runInternalAction
More patches will be added for running internal queries , and probably endAction as well.
Thanks, Yair
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "Yair Zaslavsky" <yzaslavs@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:33:19 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs@redhat.com> To: "Gilad Chaplik" <gchaplik@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:22:49 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "Yair Zaslavsky" <yzaslavs@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:14:35 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
We should enforce that in code level: getBackend() should be private in CommandBase, and won't need any convention.
Using getBackend() is also a "convention".
so you're adding another one :-)
how should I enforce not using getBackend().runXXX in reviews? I've probably need to remember your email...
Soon you will probably different signature for the helper runXXX() and the getBackend().runXXX()[1], as we are adding command context inheritance, to enable proper security context, correlation id inheritance and remove the ThreadLocal usage. So it will be easier to remember... :) [1] http://gerrit.ovirt.org/#/c/28829/
Thanks, Gilad.
----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs@redhat.com> To: devel@ovirt.org Sent: Wednesday, June 18, 2014 8:44:41 AM Subject: [ovirt-devel] Correct way to run internal actions from commands
Hi all, Thanks to the collaboration of some of the maintainers and others I have managed to merge a patch which gives the ability to run internal commands the following way:
If you're writing a code in a class that extends CommandBase, please follow the following instructions:
Instead of Backend.getInstance().runInternalAction (or MultipleActions) you should use
runInternalAction
More patches will be added for running internal queries , and probably endAction as well.
Thanks, Yair
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

----- Original Message -----
From: "Alon Bar-Lev" <alonbl@redhat.com> To: "Gilad Chaplik" <gchaplik@redhat.com> Cc: "Yair Zaslavsky" <yzaslavs@redhat.com>, devel@ovirt.org Sent: Thursday, June 19, 2014 11:41:37 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "Yair Zaslavsky" <yzaslavs@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:33:19 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs@redhat.com> To: "Gilad Chaplik" <gchaplik@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:22:49 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
----- Original Message -----
From: "Gilad Chaplik" <gchaplik@redhat.com> To: "Yair Zaslavsky" <yzaslavs@redhat.com> Cc: devel@ovirt.org Sent: Thursday, June 19, 2014 11:14:35 AM Subject: Re: [ovirt-devel] Correct way to run internal actions from commands
We should enforce that in code level: getBackend() should be private in CommandBase, and won't need any convention.
Using getBackend() is also a "convention".
so you're adding another one :-)
how should I enforce not using getBackend().runXXX in reviews? I've probably need to remember your email...
Soon you will probably different signature for the helper runXXX() and the getBackend().runXXX()[1], as we are adding command context inheritance, to enable proper security context, correlation id inheritance and remove the ThreadLocal usage.
So it will be easier to remember... :)
don't complain about the quality :-), that's what I've found: https://www.youtube.com/watch?v=Qj7WyfceJ58 Thanks, Gilad.
[1] http://gerrit.ovirt.org/#/c/28829/
Thanks, Gilad.
----- Original Message -----
From: "Yair Zaslavsky" <yzaslavs@redhat.com> To: devel@ovirt.org Sent: Wednesday, June 18, 2014 8:44:41 AM Subject: [ovirt-devel] Correct way to run internal actions from commands
Hi all, Thanks to the collaboration of some of the maintainers and others I have managed to merge a patch which gives the ability to run internal commands the following way:
If you're writing a code in a class that extends CommandBase, please follow the following instructions:
Instead of Backend.getInstance().runInternalAction (or MultipleActions) you should use
runInternalAction
More patches will be added for running internal queries , and probably endAction as well.
Thanks, Yair
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
participants (3)
-
Alon Bar-Lev
-
Gilad Chaplik
-
Yair Zaslavsky