[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH OSSTEST 2/4] Toolstack: Add OpenStack as a toolstack.



On Thu, 2015-07-16 at 12:18 +0100, Anthony PERARD wrote:
> Having a separate toolstack help to configure the host specificly for

"specifically"

> OpenStack, and also helps to have a separate flight.

Will any of the die()s here ever become real commands? I think not
because that's not how OpenStack works? i.e. how it is driven doesn't
fit into Osstest::Toolstack's model of the world at all.

Given that and given that you introduce your own recipe to sg-run-job
which doesn't/can't/won't try to do any of the usual stuff, I can't see
any reason not to simply go with toolstack=libvirt for these test cases.
That it is the most accurate reflection of what we want and if some
openstack test case did want to talk to the underlying toolstack for
some reason libvirt would be it.

That would also save duplicating the functionality of libvirt.pm's new
function, which would normally call for a subclass of some sort (e.g.
how xend is a subclass of xl). Please don't do this though ;-)

> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
>  Osstest/Toolstack/openstack.pm | 81 
> ++++++++++++++++++++++++++++++++++++++++++
>  ts-xen-install                 |  1 +
>  2 files changed, 82 insertions(+)
>  create mode 100644 Osstest/Toolstack/openstack.pm
> 
> diff --git a/Osstest/Toolstack/openstack.pm b/Osstest/Toolstack/openstack.pm
> new file mode 100644
> index 0000000..4529845
> --- /dev/null
> +++ b/Osstest/Toolstack/openstack.pm
> @@ -0,0 +1,81 @@
> +# This is part of "osstest", an automated testing framework for Xen.
> +# Copyright (C) 2015 Citrix Inc.
> +#
> +# This program is free software: you can redistribute it and/or modify
> +# it under the terms of the GNU Affero General Public License as published by
> +# the Free Software Foundation, either version 3 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU Affero General Public License for more details.
> +#
> +# You should have received a copy of the GNU Affero General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +
> +
> +package Osstest::Toolstack::openstack;
> +
> +use strict;
> +use warnings;
> +
> +use Osstest::TestSupport;
> +
> +sub new {
> +    my ($class, $ho, $methname,$asset) = @_;
> +    my @extra_packages = qw(git pwgen sudo);
> +    # package from libvirt
> +    push(@extra_packages, qw(libavahi-client3));
> +    my $nl_lib = "libnl-3-200";
> +    $nl_lib = "libnl1" if ($ho->{Suite} =~ m/wheezy/);
> +    push(@extra_packages, $nl_lib);
> +    return bless { Name => "openstack",
> +                Host => $ho,
> +                   NewDaemons => [qw(libvirtd)],
> +                Dom0MemFixed => 0,
> +                   ExtraPackages => \@extra_packages,
> +    }, $class;
> +}
> +
> +sub destroy ($$) {
> +    my ($self,$gho) = @_;
> +    die "Guest control not yet supported via OpenStack";
> +}
> +
> +sub create ($$) {
> +    my ($self,$gho) = @_;
> +    die "Guest control not yet supported via OpenStack";
> +}
> +
> +sub consolecmd ($$) {
> +    my ($self,$gho) = @_;
> +    die "Guest control not yet supported via OpenStack";
> +}
> +
> +sub shutdown_wait ($$$) {
> +    my ($self,$gho,$timeout) = @_;
> +    die "Guest control not yet supported via OpenStack";
> +}
> +
> +sub migrate_check ($) {
> +    my ($self) = @_;
> +    die "Guest control not yet supported via OpenStack";
> +}
> +
> +sub migrate ($) {
> +    my ($self,$gho,$dst,$timeout) = @_;
> +    die "Guest control not yet supported via OpenStack";
> +}
> +
> +sub save ($$$$) {
> +    my ($self,$gho,$f,$timeout) = @_;
> +    die "Guest control not yet supported via OpenStack";
> +}
> +
> +sub restore ($$$$) {
> +    my ($self,$gho,$f,$timeout) = @_;
> +    die "Guest control not yet supported via OpenStack";
> +}
> +
> +1;
> diff --git a/ts-xen-install b/ts-xen-install
> index 0f53382..e7e823d 100755
> --- a/ts-xen-install
> +++ b/ts-xen-install
> @@ -72,6 +72,7 @@ sub packages () {
>  sub extract () {
>      my @parts = ('', 'kern', 'xen');
>      push @parts, 'libvirt' if $r{toolstack} eq "libvirt";
> +    push @parts, 'libvirt' if $r{toolstack} eq "openstack";
>  
>      foreach my $part (@parts) {
>          target_extract_jobdistpath($ho, $part, "path_${part}dist",



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.