THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
diff --git managementnode/lib/VCL/DataStructure.pm managementnode/lib/VCL/DataStructure.pm index 8ffe9a2..238e164 100644 --- managementnode/lib/VCL/DataStructure.pm +++ managementnode/lib/VCL/DataStructure.pm @@ -2342,6 +2342,7 @@ sub get_reservation_info_json_string { $json_data->{reservation} = prune_hash_child_references($request_data_clone->{reservation}{$reservation_id}); $json_data->{imagerevision} = prune_hash_child_references($request_data_clone->{reservation}{$reservation_id}{imagerevision}); $json_data->{image} = prune_hash_child_references($request_data_clone->{reservation}{$reservation_id}{image}); + $json_data->{OS} = prune_hash_child_references($request_data_clone->{reservation}{$reservation_id}{image}{OS}); $json_data->{computer} = prune_hash_child_references($request_data_clone->{reservation}{$reservation_id}{computer}); if (defined($request_data_clone->{reservation}{$reservation_id}{computer}{vmhost})) { @@ -2349,10 +2350,15 @@ sub get_reservation_info_json_string { $json_data->{vmhost_computer} = prune_hash_child_references($request_data_clone->{reservation}{$reservation_id}{computer}{vmhost}{computer}); } - } - # TODO: figure out how to handle user info, what structure, etc #$json_data->{users} = $request_data_clone->{reservation}{$reservation_id}{users}; - #$json_data->{user} = $request_data_clone->{user}; - #$json_data->{user}{username} = $json_data->{user}{unityid}; + $json_data->{user} = prune_hash_child_references($request_data_clone->{user}); + + $json_data->{user}{username} = $json_data->{user}{unityid}; + $json_data->{user}{affiliation} = $request_data_clone->{user}{affiliation}{name}; + + my @delete_keys = ('IMtypeid', 'sshpublickeys', 'showallgroups', 'validated', 'usepublickeys', 'RETRIEVAL_TIME', 'lastupdated', 'FEDERATED_LINUX_AUTHENTICATION', 'IMid', 'ROOTACCESS'); + foreach my $key (@delete_keys) { + delete $json_data->{user}{$key}; + } # IMPORTANT: delete vmprofile data and anything else that may contain passwords #delete $json_data->{computer}{vmhost}{vmprofile}; |
After creating the patch, cd to /usr/local/vcl and apply the patch with the following command (assuming the patch is in /tmp):
Code Block | ||
---|---|---|
| ||
patch -p1 < /tmp/guacamole_DataStructure.patch |
You should see output similar to:
...