Re: Refactoring CitrixResourceBase

2016-05-26 Thread Rafael Weingärtner
Got it, maybe when you open the PR we can work together to use spring framework to manage those beans. On Thu, May 26, 2016 at 2:05 PM, Syed Mushtaq wrote: > Yes Rafae. I saw that XenServer classes are not plugged into Spring. I am > instantiating the objects manually in the configure() method o

Re: Refactoring CitrixResourceBase

2016-05-26 Thread Syed Mushtaq
Yes Rafae. I saw that XenServer classes are not plugged into Spring. I am instantiating the objects manually in the configure() method of the base class and using them. On Thu, May 26, 2016 at 12:16 PM, Rafael Weingärtner < rafaelweingart...@gmail.com> wrote: > Indeed, this is a non-trivial job,

Re: Refactoring CitrixResourceBase

2016-05-26 Thread Rafael Weingärtner
Indeed, this is a non-trivial job, and it will take a pretty good amount of time and effort. Sorry, I did not understand what you meant with "reference" file. Is that the base file that you are using to create a hierarchy? The solution you are creating looks promising, I am just wondering; you sa

Re: Refactoring CitrixResourceBase

2016-05-25 Thread Will Stevens
cool. :) *Will STEVENS* Lead Developer *CloudOps* *| *Cloud Solutions Experts 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw @CloudOps_ On Wed, May 25, 2016 at 9:45 PM, Syed Mushtaq wrote: > Nope. I think they should all be XenServer (they were Citrix earlier) I > plan

Re: Refactoring CitrixResourceBase

2016-05-25 Thread Syed Mushtaq
Nope. I think they should all be XenServer (they were Citrix earlier) I plan to clean that up too. -Syed On Wed, May 25, 2016 at 9:43 PM, Will Stevens wrote: > Is there a reason some are prefixed with 'Xs' and others are prefixed with > 'XenServer'? > On May 25, 2016 9:41 PM, "Will Stevens" wr

Re: Refactoring CitrixResourceBase

2016-05-25 Thread Will Stevens
Is there a reason some are prefixed with 'Xs' and others are prefixed with 'XenServer'? On May 25, 2016 9:41 PM, "Will Stevens" wrote: > Ya. I didn't know either and made the same mistake. :) > On May 25, 2016 9:40 PM, "Syed Mushtaq" wrote: > >> Aah I did not know that. Thanks Will .. here is th

Re: Refactoring CitrixResourceBase

2016-05-25 Thread Will Stevens
Ya. I didn't know either and made the same mistake. :) On May 25, 2016 9:40 PM, "Syed Mushtaq" wrote: > Aah I did not know that. Thanks Will .. here is the link > http://i.imgur.com/5B55XMB.png > > On Wed, May 25, 2016 at 6:37 PM, Will Stevens > wrote: > > > Attachments don't work. You will have

Re: Refactoring CitrixResourceBase

2016-05-25 Thread Syed Mushtaq
Aah I did not know that. Thanks Will .. here is the link http://i.imgur.com/5B55XMB.png On Wed, May 25, 2016 at 6:37 PM, Will Stevens wrote: > Attachments don't work. You will have to host it publicly and then post a > link to it. > On May 25, 2016 4:28 PM, "Syed Ahmed" wrote: > > > Forgot to a

Re: Refactoring CitrixResourceBase

2016-05-25 Thread Will Stevens
Attachments don't work. You will have to host it publicly and then post a link to it. On May 25, 2016 4:28 PM, "Syed Ahmed" wrote: > Forgot to attach screenshot > > On Wed, May 25, 2016 at 4:09 PM, Syed Ahmed wrote: > >> Thanks Rafael, >> >> Here is how I am doing. You can see the tree in the sc

Re: Refactoring CitrixResourceBase

2016-05-25 Thread Syed Ahmed
Forgot to attach screenshot On Wed, May 25, 2016 at 4:09 PM, Syed Ahmed wrote: > Thanks Rafael, > > Here is how I am doing. You can see the tree in the screenshot attached. I > have started with storage and extracted the storage commands out of > CitrixResourceBase (I've renamed it to XenServerR

Re: Refactoring CitrixResourceBase

2016-05-25 Thread Syed Ahmed
Thanks Rafael, Here is how I am doing. You can see the tree in the screenshot attached. I have started with storage and extracted the storage commands out of CitrixResourceBase (I've renamed it to XenServerResourceBase). This is the file for refrence. Let me know what you think. https://github.co

Re: Refactoring CitrixResourceBase

2016-05-25 Thread Rafael Weingärtner
Hi Syed, That is a great job. I would only suggest breaking the commons a little bit more between “monitoring” and “common”. On the monitoring side, we could have host monitoring, VMs monitoring, VMs' status checks (running, stopped, and others) and maybe other tasks that aim to monitor/check a res

Re: Refactoring CitrixResourceBase

2016-05-25 Thread Syed Mushtaq
Hey Guys, To give you an update, I've identified and categorized the functions in CitrixResourceBase into 4 categories 1) common: These deal with the host as a whole (example getHostInfo, callPlugin, connection pool etc) 2) compute: Dealing with operations on VMs (start,stop, reboot, update etc)

Re: Refactoring CitrixResourceBase

2016-05-20 Thread Syed Mushtaq
Thanks guys for the Ideas. I will open a JIRA ticket and start working on it. -Syed On Thu, May 19, 2016 at 7:57 PM, Rafael Weingärtner < rafaelweingart...@gmail.com> wrote: > Hi Syed, > That is a great idea; however, it is a very hard task. > The idea of Tim is great; actually, we already have

Re: Refactoring CitrixResourceBase

2016-05-19 Thread Rafael Weingärtner
Hi Syed, That is a great idea; however, it is a very hard task. The idea of Tim is great; actually, we already have some sort of hierarchy that is used in “CitrixResourceBase.java”. I would suggest you first removing the unused code, unused variable, and duplicate methods; that would be one PR. You

Re: Refactoring CitrixResourceBase

2016-05-19 Thread Daan Hoogland
Syed, gogogo. actually it has shrunk to 5k lines since 2012 ;) I like your initiative and initial direction. A lot of small steps to improve the blob have been taken and I would sugest to keep going in small steps. On Thu, May 19, 2016 at 9:44 PM, Tim Mackey wrote: > +1 > > When I went through

Re: Refactoring CitrixResourceBase

2016-05-19 Thread Tim Mackey
+1 When I went through this last time, not only was it hard to understand the flows, but the XenServer version management was a pain. Would suggest creating a base class which always works (i.e. is independent of XenServer version) for core functions. Then add in that which exists for a specific v

Refactoring CitrixResourceBase

2016-05-19 Thread Syed Mushtaq
Hi All, I would like to refactor CitrixResourceBase class which is responsible for communicating with Xenserver. It has grown too long (>5K lines) and has absolutely no testing. In my first pass I want to separate out the functionality buy the subsystem it targets (compute, storage, network etc)