Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59D5A11B18 for ; Fri, 25 Apr 2014 04:13:17 +0000 (UTC) Received: (qmail 67246 invoked by uid 500); 25 Apr 2014 04:13:16 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 66732 invoked by uid 500); 25 Apr 2014 04:13:12 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 66721 invoked by uid 99); 25 Apr 2014 04:13:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 04:13:11 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of koushik.das@citrix.com designates 103.14.252.240 as permitted sender) Received: from [103.14.252.240] (HELO SMTP.CITRIX.COM.AU) (103.14.252.240) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 04:13:06 +0000 X-IronPort-AV: E=Sophos;i="4.97,924,1389744000"; d="scan'208";a="4892024" Received: from sinaccessns.citrite.net (HELO SINPEX01CL03.citrite.net) ([10.151.60.9]) by sinpip01.citrite.net with ESMTP; 25 Apr 2014 04:12:43 +0000 Received: from SINPEX01CL02.citrite.net ([169.254.2.192]) by SINPEX01CL03.citrite.net ([169.254.3.250]) with mapi id 14.03.0123.003; Fri, 25 Apr 2014 12:12:43 +0800 From: Koushik Das To: "" Subject: Re: HypervisorType - possible feature idea Thread-Topic: HypervisorType - possible feature idea Thread-Index: AQHPX//8+hzIBMALE0y6n7Imef30iJsgvycAgABz+AA= Date: Fri, 25 Apr 2014 04:12:43 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.151.46.1] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DLP: SIN1 X-Virus-Checked: Checked by ClamAV on apache.org Ideally the API and orchestration layers shouldn't have any HV specific cod= e. You may have already seen that there are places in the code which checks if= an operation is supported based on HV type like below. if (Vmware) throw ex All these checks should rely on hypervisor_capabilities table instead. Then there is another kind where based on HV type the logic differs. if (XS) foo() else bar() These kind of code needs to go to the plugin module specific to HV. Some of these may be simple but for the rest you need to be careful not to = break anything. On 25-Apr-2014, at 2:47 AM, Laszlo Hornyak wrote= : > Hi Sam, >=20 > I think it would take a big lot of work but the direction is nice. > A lot of classes would have to be modified to be plugable, and possibly t= he > Hypervisor interface would grow big to support all these cases. >=20 > There are 1097 references to HypervisorType according to eclipse. >=20 >=20 > On Thu, Apr 24, 2014 at 10:57 PM, Sam Schmit wro= te: >=20 >> Hello everyone, >>=20 >> I've recently started working with Cloudstack, and was going through the >> codebase and had a question about a possible feature for future versions= - >> making the HypervisorType more dynamic. Right now, it seems there are >> several places where specific types are referenced. I would like to mak= e >> it more dynamic - have hypervisors be a pluggable type so that any >> hypervisor can be added using the Cloudstack plugin architecture. >>=20 >> I've taken a look at the existing code, and it seems as though the enum = is >> used not just by the hypervisor's "discoverer" class, but also by other >> classes/methods to say which hypervisors they work with or are looking f= or. >>=20 >> Is there a reason it's done this way, instead of generating a dynamic li= st >> of hypervisors that are supported at run-time? Have there been attempts= to >> make this change in the past? Has anyone begun work on this feature >> already? Anyone have thoughts on where the easy/difficult areas for suc= h >> an undertaking would reside? >>=20 >> Thanks for any thoughts on this, and I look forward to working with >> everyone in the near future. >>=20 >> Sam Schmit >>=20 >=20 >=20 >=20 > --=20 >=20 > EOF