Skip to content

Commit

Permalink
ncm-opennebula: remove old legacy code
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosimon authored and jrha committed Dec 16, 2024
1 parent 51f3f91 commit 2c215ca
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
3 changes: 0 additions & 3 deletions ncm-opennebula/src/main/pan/components/opennebula/schema.pan
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,6 @@ Set OpenNebula hypervisor options and their virtual clusters (if any)
type opennebula_host = {
@{set OpenNebula hosts type.}
'host_hyp' : string = 'kvm' with match (SELF, '^(kvm|xen)$')
@{set the network driver in your hosts.
This option is not longer used by ONE >= 5.x versions.}
'vnm_mad' ? string with match (SELF, '^(dummy|ovswitch|ovswitch_brcompat)$')
@{Set the hypervisor cluster. Any new hypervisor is always included within
"Default" cluster.
Hosts can be in only one cluster at a time.}
Expand Down
6 changes: 1 addition & 5 deletions ncm-opennebula/src/main/perl/OpenNebula/AII.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ use NCM::Component::OpenNebula::Server qw($ONEADMIN_USER);
use Readonly;
use EDG::WP4::CCM::TextRender;

Readonly my $MINIMAL_ONE_VERSION => version->new("4.8.0");
Readonly my $MINIMAL_ONE_VERSION => version->new("5.0.0");
Readonly my $AII_OPENNEBULA_CONFIG => "/etc/aii/opennebula.conf";
Readonly my $HOSTNAME => "/system/network/hostname";
Readonly my $DOMAINNAME => "/system/network/domainname";
Readonly my $MAXITER => 20;
Readonly my $TIMEOUT => 30;
Readonly my $ONE_DEFAULT_URL => 'http://localhost:2633/RPC2';
Readonly my $ONE_DEFAULT_PORT => 2633;
Readonly my $BOOT_V4 => [qw(network hd)];
Readonly my $BOOT_V5 => [qw(nic0 disk0)];

=head1 NAME
Expand Down Expand Up @@ -79,9 +78,6 @@ sub process_template_aii
if ((defined $oneversion) and ($oneversion >= version->new("5.0.0"))) {
$tree->{system}->{opennebula}->{boot} = $BOOT_V5;
$self->verbose("BOOT section set to support OpenNebula versions >= 5.0.0");
} else {
$self->verbose("BOOT section set to support OpenNebula versions < 5.0.0");
$tree->{system}->{opennebula}->{boot} = $BOOT_V4;
};

my $tpl = EDG::WP4::CCM::TextRender->new(
Expand Down
1 change: 0 additions & 1 deletion ncm-opennebula/src/main/perl/OpenNebula/Host.pm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ sub manage_hosts
$new = $self->update_something($one, "host", $host, "QUATTOR = 1");
if (defined($hosts->{$host}->{pin_policy})) {
$new = $self->update_something($one, "host", $host, "PIN_POLICY = $hosts->{$host}->{pin_policy}");
$self->verbose("HELLO pin defined: ", $hosts->{$host}->{pin_policy});
};
if (defined($new) and defined($hosts->{$host}->{cluster})) {
$self->verbose("Host $host cluster is set to: ", $hosts->{$host}->{cluster});
Expand Down
13 changes: 5 additions & 8 deletions ncm-opennebula/src/main/perl/opennebula.pm
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,17 @@ To set up the initial cluster, some steps should be taken:
=over
=item 1. First install the required Ruby gems in your OpenNebula server (only for OpenNebula 5.10 or older).
You can use OpenNebula installgems addon : L<https://github.com/OpenNebula/addon-installgems>.
=item 2. The OpenNebula server(s) should have passwordless ssh access as oneadmin user to all the host hosts of the cluster.
=item 1. The OpenNebula server(s) should have passwordless ssh access as oneadmin user to all the host hosts of the cluster.
e.g. by distributing the public key(s) of the OpenNebula host over the cluster.
=item 3. Start OpenNebula services: C<< # for i in '' -econe -gate -novnc -occi -sunstone; do service opennebula$i stop; done >>
=item 2. Start OpenNebula services: C<< # for i in '' -econe -gate -novnc -occi -sunstone; do service opennebula$i stop; done >>
=item 4. Run the component a first time.
=item 3. Run the component a first time.
=item 5. The new oneadmin password will be available from C<< /var/lib/one/.one/one_auth >> file.
=item 4. The new oneadmin password will be available from C<< /var/lib/one/.one/one_auth >> file.
The old auth files are stored with .quattor.backup extension.
=item 6. It is also possible to change sunstone service password, just include
=item 5. It is also possible to change sunstone service password, just include
'serveradmin' user and passwd within opennebula/users tree.
In that case the component also updates the C<< sunstone_auth >> file.
Expand Down
2 changes: 1 addition & 1 deletion ncm-opennebula/src/test/perl/aii_vmtemplate.t
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $opennebulaaii->mock('read_one_aii_conf', Net::OpenNebula->new(url => "http://l
user => "oneadmin",));

my $aii = NCM::Component::opennebula->new();
my $oneversion = version->new("5.0.0");
my $oneversion = version->new("6.0.0");

my $ttout = $aii->process_template_aii($cfg, "vmtemplate", $oneversion);

Expand Down

0 comments on commit 2c215ca

Please sign in to comment.