Убраны зависимости на json и tcllib
This commit is contained in:
@@ -340,50 +340,6 @@ proc GetWorkTreeRow {} {
|
||||
return $lst
|
||||
}
|
||||
|
||||
proc JsonGet {json args} {
|
||||
foreach key $args {
|
||||
if {[dict exists $json $key]} {
|
||||
set json [dict get $json $key]
|
||||
} elseif {[string is integer $key]} {
|
||||
if {$key >= 0 && $key < [llength $json]} {
|
||||
set json [lindex $json $key]
|
||||
} else {
|
||||
error "can't get item number $key from {$json}"
|
||||
}
|
||||
} else {
|
||||
error "can't get \"$key\": no such key in {$json}"
|
||||
}
|
||||
}
|
||||
return $json
|
||||
}
|
||||
|
||||
proc CreateInfoBasesJSONfile {} {
|
||||
global default dir
|
||||
set info_base_json_file [file join $dir(work) infobases.lst]
|
||||
set jsonStr { \
|
||||
{
|
||||
"servers":[
|
||||
{ "server-id": "server_id1",
|
||||
"clusters": [
|
||||
{"cluster-id": "cluster_id_1", "infobases": [
|
||||
{"infobase-uid": "infobase_uid_1", "infobase-user":"infobase_user", "infobase-pwd":"infobase_pwd"},
|
||||
{"infobase-uid": "infobase_uid_2", "infobase-user":"infobase_user", "infobase-pwd":"infobase_pwd"}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ "server-id": "server_id2",
|
||||
"clusters": [
|
||||
{"cluster-id": "cluster_id_1", "infobases": [
|
||||
{"infobase-uid": "infobase_uid_1", "infobase-user":"infobase_user", "infobase-pwd":"infobase_pwd"},
|
||||
{"infobase-uid": "infobase_uid_2", "infobase-user":"infobase_user", "infobase-pwd":"infobase_pwd"}]
|
||||
}
|
||||
]}
|
||||
]}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace eval Run {} {}
|
||||
# Получение данных по кластерам
|
||||
|
||||
@@ -2479,3 +2435,4 @@ proc Del::inet {tree host profile_name} {
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user