Esempio n. 1
0
 public static function modifyConf($user, $password, $path, $idc = NULL, $node_val = "", $main_buss_id = "", $sub_buss_id = "")
 {
     if ($idc == NULL) {
         $idc = QconfExtra::getIdc();
     }
     $url_whole = self::$url . "/extra/modifyConf?user={$user}&password={$password}&path={$path}&idc={$idc}" . "&node_val={$node_val}&main_buss_id={$main_buss_id}&sub_buss_id={$sub_buss_id}";
     return self::getRequest($url_whole);
 }
Esempio n. 2
0
<?php

require_once dirname(__FILE__) . "/QconfExtra.php";
$test_user = "******";
// 测试用户,使用中,需要更改为业务自己的账号
$test_pwd = "1z2x3c4v5b";
// 测试密码,使用中,需要更改为业务自己的密码
$path = "demo/test_one";
// 测试节点
$node_val = "test";
// 测试节点值
$desc = "good";
// 测试节点描述,用于说明该节点给谁使用,或者有什么作用
// $idc = "corp";           // 测试机房,使用中,需要更改为业务自身的机房,或者不设置则使用当前机房
// $main_buss_id = "1509";  // demo主业务,使用中,需要更改为业务自己在hulk中对应的主业务id,防止不同业务之间相互影响
// $sub_buss_id = "1510";   // demo子业务,使用中,需要更改为业务自己在hulk中的对应的子业务id,防止不同业务之间相互影响
$ret = QconfExtra::addConf($test_user, $test_pwd, $path, $idc, $node_val, $main_buss_id, $sub_buss_id, $desc);
echo $ret . PHP_EOL;
$node_val = "good_test";
$ret = QconfExtra::modifyConf($test_user, $test_pwd, $path, $idc, $node_val, $main_buss_id, $sub_buss_id, $desc);
echo $ret . PHP_EOL;
$ret = QconfExtra::deleteConf($test_user, $test_pwd, $path, $idc, $main_buss_id, $sub_buss_id);
echo $ret . PHP_EOL;