179,184d178
<     connection => {
<         optional => 1,
<         type => 'string', format => 'pve-connection-features',
<         description => "Selectively enable connection features. This is the connection allowed",
<         default => 0,
<     },
911,946d904
< 
< 
< sub parse_connection_features {
<     my ($data) = @_;
< 
<     my $res = {};
< 
<     return $res if $data eq '0';
<     
<     $data = $confdesc->{connection}->{default} if $data eq '1';
< 
<     foreach my $feature (PVE::Tools::split_list($data)) {
< 	if ($feature =~ m/^(rdp|ws-rdp|vnc|ws-vnc|ssh|ws-ssh|nx|ws-nx)$/) {
< 	    $res->{$1} = 1;
< 	} else {
< 	    warn "ignoring unknown connection feature '$feature'\n";
< 	}
<     }
<     return $res;
< }
< 
< 
< PVE::JSONSchema::register_format('pve-connection-features', \&pve_verify_connection_features);
< sub pve_verify_connection_features {
<     my ($value, $noerr) = @_;
< 
<     return $value if parse_connection_features($value);
< 
<     return undef if $noerr;
< 
<     die "unable to parse hotplug option\n";
< }
< 
< 
< 
< 
