"nfs" => {
"%comment" => "Properties for an NFS mount definition",
"%export_name" => {
"%type" => "path"
},
"%filer_device" => {
"%type" => "string"
},
"%filer_volume" => {
"%type" => "path"
},
"%mount_acl" => {
"%type" => "integer"
},
"%mount_group" => {
"%type" => "string"
},
"%mount_opts" => {
"%type" => "string"
},
"%mount_user" => {
"%type" => "string"
}
}
####
{
"%name": "Global Central Configuration file",
"%description": "A representation of nfs mount points for dev machines",
"%schema": "schema.conf",
"@dev": {
"home_nfs": {
"%default": {
"%mount_opts": "nfsvers=3,timeo=600,retrans=2",
"%mount_user": "root",
"%mount_group": "root",
"%mount_acl": "0755"
},
"%comment": "----Home NFS Directories----",
"home-lnk-mpt": {
"%export_name": "/links",
"%filer_device": {
"@west": "nydevnfs_links",
"@ridge": "rnap7750-s"
},
"%filer_volume": {
"@west": "/vol/links",
"@ridge": "/vol/links_c"
}
},
"home7_mpt": {
"%export_name": "/home7",
"%filer_device": {
"@west": "nydevnfs_home7",
"@ridge": "rnap7751-s"
},
"%filer_volume": {
"@west": "/vol/home7",
"@ridge": "/vol/home7_c"
}
},
"home8_mpt": {
"%export_name": "/home8",
"%filer_device": {
"@west": "nydevnfs_home2",
"@ridge": "rnap2114-s"
},
"%filer_volume": {
"@west": "/vol/home2",
"@ridge": "/vol/home2_c"
}
},
####
sub recurse_hash {
my($hash,@findkeys) = @_;
foreach (sort keys %{$hash}) {
my $value = $hash->{$_};
if (ref($value) eq 'HASH') {
recurse_hash($value,@findkeys);
}
for my $key (@findkeys) {
if ($key eq $_) {
print "$_ = $value\n";
}
}
}
}
####
recurse_hash(\%$decoded_json_obj,"@keylist");
####
recurse_hash(\%$decoded_json_obj,"%export_name","%filer_device","%filer_volume","%mount_acl","%mount_group","%mount_opts");
####
/links:nydevnfs_links:/vol/links:0755:root:root:nfsvers=3,timeo=600,retrans=2
/links:rnap7750-s:/vol/links_c:0755:root:root:nfsvers=3,timeo=600,retrans=2
/home7:nydevnfs_home7:/vol/home7:0755:root:root:nfsvers=3,timeo=600,retrans=2
/home7:rnap7751-s:/vol/home7_c:0755:root:root:nfsvers=3,timeo=600,retrans=2
/home8:nydevnfs_home2:/vol/home2:0755:root:root:nfsvers=3,timeo=600,retrans=2
/home8:rnap2114-s:/vol/home2_c:0755:root:root:nfsvers=3,timeo=600,retrans=2