Copy in existing graphics device info as much as possible to avoid config

mismatch on temporary password change


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9471 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-05-03 13:21:18 +00:00
parent 631a625666
commit 9b44d29b50

View File

@ -673,9 +673,16 @@ sub getcons {
$sconsparms->{node}->[0]->{baudrate}=[$serialspeed];
return (0,$sconsparms);
} elsif ($type eq "vid") {
my $domxml = $dom->get_xml_description();
my $parseddom = $parser->parse_string($domxml);
my ($graphicsnode) = $parseddom->findnodes("//graphics");
my $tpasswd=genpassword(16);
my $validto=POSIX::strftime("%Y-%m-%dT%H:%M:%S",gmtime(time()+300));
$dom->update_device("<graphics type='".$consdata->{vidproto}."' passwd='$tpasswd' passwdValidTo='$validto' autoport='yes'/>");
$graphicsnode->setAttribute("passwd",$tpasswd);
$graphicsnode->setAttribute("passwdValidTo",$validto);
$dom->update_device($graphicsnode->toString());
#$dom->update_device("<graphics type='".$consdata->{vidproto}."' passwd='$tpasswd' passwdValidTo='$validto' autoport='yes'/>");
$consdata->{password}=$tpasswd;
$consdata->{server}=$hyper;
return $consdata;