Спасибо, будем смотреть.
Я удалил пока дамп из сообщения.
Я удалил пока дамп из сообщения.
We really need your input in this questionnaire
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menumkdir c:\tmp
cd c:\tmp
git clone git://github.com/kennethreitz/requests.git
java -jar nxshell-2.0.5.jar
Server IP [127.0.0.1]:
Login [admin]:
Password [netxms]:
NetXMS 2.0.5 Interactive Shell
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named requests
>>> import sys
>>> sys.path.append('c:\\tmp\\requests')
>>> import requests
>>> r = requests.get('https://www.netxms.org/')
<Response [200]>
>>> r.status_code
200
>>> r.headers
{'Keep-Alive': 'timeout=15, max=100', 'Server': 'Apache/2.2.16 (Debian)', 'Connection': 'Keep-Alive', 'Date': 'Wed, 17 Aug 2016 14:06:34 GMT', 'Accept-Ranges': 'bytes', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'Content-Length': '3237', 'Content-Type': 'text/html'}
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.4</version>
</dependency>
final NXCObjectModificationData md = new NXCObjectModificationData(object.getObjectId());
GeoLocation location = GeoLocation.parseGeoLocation(latitude.getText(), longitude.getText());
md.setGeolocation(location);
final NXCSession session = (NXCSession)ConsoleSharedData.getSession();
session.modifyObject(md);
sub dbgPaddingLeft(s, len) {
if (s == NULL) {
s = "";
}
padding = "";
for (i = 0; i < len - length(s); i++) {
padding .= " ";
}
return padding . s;
}
sub dbgPaddingRight(s, len) {
if (s == NULL) {
s = "";
}
padding = "";
for (i = 0; i < len - length(s); i++) {
padding .= " ";
}
return s . padding;
}
sub dbgPrintTable(t) {
if (t == NULL) {
return;
}
array columnLen;
for (i = 0; i < t->columnCount; i++) {
columnLen[i] = length(t->columns[i]->displayName);
}
for (i = 0; i < t->rowCount; i++) {
for (j = 0; j < t->columnCount; j++) {
val = t->get(i, j);
if (val == NULL) {
val = "";
}
columnLen[j] = max(columnLen[j], length(val));
}
}
for (i = 0; i < t->columnCount; i++) {
print(dbgPaddingRight(t->columns[i]->displayName, columnLen[i]) . " | ");
}
println;
for (i = 0; i < t->columnCount; i++) {
for (j = 0; j < columnLen[i]; j++) {
print("-");
}
print("-+-");
}
println;
for (i = 0; i < t->rowCount; i++) {
for (j = 0; j < t->columnCount; j++) {
print(dbgPaddingRight(t->get(i, j), columnLen[j]) . " | ");
}
println;
}
println;
}
// Warning: this script works only on the same node
//
// $1 - Description
// $2 - column name
table = GetDCIValueByDescription($node, $1);
if (table != NULL) {
col = table->getColumnIndex($2);
if (col >= 0) {
return table->get(0, col);
}
}
return 0;