racktables
5 years agoadd Ubuntu-specific notes
Denis Ovsienko [Sat, 30 Aug 2014 12:11:47 +0000 (13:11 +0100)] 
add Ubuntu-specific notes

5 years agofixup lists formatting in README
Denis Ovsienko [Sat, 30 Aug 2014 10:42:36 +0000 (11:42 +0100)] 
fixup lists formatting in README

5 years agobugfix: 802.1Q support of Huawei VRP 8.80 devices
Alexey Andriyanov [Thu, 28 Aug 2014 10:45:18 +0000 (14:45 +0400)] 
bugfix: 802.1Q support of Huawei VRP 8.80 devices

vrp85Read8021QConfig was pasing output of the "display vlan summary"
command taking the last line by regexp "VLAN ID: .*". Huawei VRP 8 has 3
classes of VLANs in that output: static, dynamic, reserved. RT wants to
read only static list, but it was expecting the rest two classes to be
empty.

The recent version of VRP 8.80 fills the third class (it is called
'service' VLANs) with VIDs 4064-4094, and this breaks the parser.

This fix forces RT to take the first list, not the last one.

5 years agouse json_encode instead of home-made formatting
Alexey Andriyanov [Thu, 28 Aug 2014 10:41:26 +0000 (14:41 +0400)] 
use json_encode instead of home-made formatting

switchportInfoJS changed

5 years agofix option name in help message of gateways/ssh
Alexey Andriyanov [Wed, 13 Aug 2014 15:21:04 +0000 (19:21 +0400)] 
fix option name in help message of gateways/ssh

5 years agoMerge pull request #73 from xornet-sl/xornet-dev
Alexey Andriyanov [Tue, 26 Aug 2014 13:44:07 +0000 (17:44 +0400)] 
Merge pull request #73 from xornet-sl/xornet-dev

xos12: fix MAC output format

5 years agoMAC Address List format unification 73/head
Vladimir Sukhonosov [Tue, 26 Aug 2014 13:23:59 +0000 (17:23 +0400)] 
MAC Address List format unification

deviceconfig.php:
        xos12ReadMacList now returns mac address in cisco like format

5 years agoMerge pull request #72 from gescheit/redefine_feature
Alexey Andriyanov [Tue, 26 Aug 2014 09:39:59 +0000 (13:39 +0400)] 
Merge pull request #72 from gescheit/redefine_feature

Proper way to redefine constants

5 years agouse defineIfNotDefined() for some constants 72/head
Aleksandr Balezin [Fri, 22 Aug 2014 13:23:10 +0000 (17:23 +0400)] 
use defineIfNotDefined() for some constants

TAGNAME_REGEXP AUTOTAGNAME_REGEXP constants can be defined before.

5 years agonew defineIfNotDefined() utility function
Aleksandr Balezin [Fri, 22 Aug 2014 13:20:28 +0000 (17:20 +0400)] 
new defineIfNotDefined() utility function

5 years agoserializeTags(): use HTML entity, not Unicode char
Denis Ovsienko [Sun, 17 Aug 2014 06:46:03 +0000 (07:46 +0100)] 
serializeTags(): use HTML entity, not Unicode char

5 years agorestore the r/o DB access semantics in LDAP auth
Alexey Andriyanov [Wed, 13 Aug 2014 15:04:24 +0000 (19:04 +0400)] 
restore the r/o DB access semantics in LDAP auth

The commit "70057f4 remember last successful LDAP server" broke the
semantics that DB write attempts did not occure when
$LDAP_options['cache_expiry'] was 0.

It is possible to set-up mysql replication and use RT in read-only mode
on a slave server with LDAP authentication, but LDAP caching must be turned
off.

This commit makes authenticated_via_ldap(), queryLDAPServer() funcs
to check the cache_expiry LDAP option before writing to the DB. Thus,
the "last successful LDAP server" does not work any more when LDAP caching
is disabled.

5 years agoproxyMuninRequest(): fix spotEntity() call
Denis Ovsienko [Sat, 9 Aug 2014 20:25:29 +0000 (21:25 +0100)] 
proxyMuninRequest(): fix spotEntity() call

Use ID of the current object and not of the specified Munin server,
otherwise this triggers an exception or uses irrelevant domain suffix
for the image URL.

5 years agodictionary: group some Sun entries (#1295)
Fabien Archambault [Mon, 4 Aug 2014 20:07:42 +0000 (21:07 +0100)] 
dictionary: group some Sun entries (#1295)

5 years agoVersion number of Debian wheezy is 7, not 7.0.
Ferenc Wágner [Sun, 3 Aug 2014 21:23:35 +0000 (22:23 +0100)] 
Version number of Debian wheezy is 7, not 7.0.

"Debian 7.0 (wheezy)" is not correct: the current wheezy point release
is 7.5; wheezy itself should have the single digit version number 7.

5 years agofix device id regex
Maksim Losev [Thu, 24 Jul 2014 06:59:37 +0000 (10:59 +0400)] 
fix device id regex

Symbol '_' is often used in local names, despite of RFC.

5 years agoadd some new UCS models
Jeff Silberman [Sat, 2 Aug 2014 21:52:15 +0000 (22:52 +0100)] 
add some new UCS models

2 of the blades were already in the dictionary.

5 years agofix id conflict in dictionary
Alexey Andriyanov [Wed, 30 Jul 2014 16:36:17 +0000 (20:36 +0400)] 
fix id conflict in dictionary

two different items had the 2142 id. Renumber one of them.

5 years agonew dictionary items for Edge-Core AS* switches
Alexey Andriyanov [Wed, 30 Jul 2014 16:35:39 +0000 (20:35 +0400)] 
new dictionary items for Edge-Core AS* switches

5 years agolink status, MAC list support for ExtremeXOS
Alexey Andriyanov [Tue, 29 Jul 2014 15:52:59 +0000 (19:52 +0400)] 
link status, MAC list support for ExtremeXOS

new handlers: xos12ReadInterfaceStatus, xos12ReadMacList

5 years agoqueryTerminal: extend prompt regexp for air12
Alexey Andriyanov [Tue, 29 Jul 2014 11:03:34 +0000 (15:03 +0400)] 
queryTerminal: extend prompt regexp for air12

5 years agogateways/telnet: reindent to tabs
Alexey Andriyanov [Tue, 29 Jul 2014 10:29:19 +0000 (14:29 +0400)] 
gateways/telnet: reindent to tabs

5 years agogateways/telnet: fix buffering issues
Alexey Andriyanov [Tue, 29 Jul 2014 10:26:45 +0000 (14:26 +0400)] 
gateways/telnet: fix buffering issues

command prompt is now displayed before reading next input command
Line-buffering of STDOUT is disabled to allow debugging in terminal

5 years agounify permissions check for VLAN changes
Alexey Andriyanov [Thu, 17 Jul 2014 17:57:32 +0000 (21:57 +0400)] 
unify permissions check for VLAN changes

The VLAN permissions logic from authorize8021QChangeRequests
(functions.php) was duplicated in getAccessPortControlCode
(interface.php). New function nativeVlanChangePermitted now used to
check access ports VLAN permissions. It calls the
authorize8021QChangeRequests in turn.

Also, the overriding hook added into the authorize8021QChangeRequests.

5 years agoremember last successful LDAP server
xornet [Wed, 16 Jul 2014 17:18:07 +0000 (21:18 +0400)] 
remember last successful LDAP server

cache last successful LDAP server for minimize
LDAP auth delay when primary server is down

queryLDAPServer:
Try to connect to last successful LDAP server.
If there is no last successful server, then cycle
through servers that specified in configuration
and save found server in cache.

authenticated_via_ldap:
Invalidate last successful server cache on
configuration change

authenticated_via_ldap_cache:
LDAP cache invalidation check was moved to
authenticated_via_ldap

6 years agodatabase.php: add deleteScript function
xornet [Wed, 16 Jul 2014 16:57:53 +0000 (20:57 +0400)] 
database.php: add deleteScript function

6 years agofix Live ports tab is blank for some breeds
xornet [Wed, 16 Jul 2014 08:21:37 +0000 (12:21 +0400)] 
fix Live ports tab is blank for some breeds

interface.php: add check for valid breed function in renderPortsInfo

6 years agolink status feature is available on Cisco IOS XR (ASR)
xornet [Wed, 16 Jul 2014 08:19:57 +0000 (12:19 +0400)] 
link status feature is available on Cisco IOS XR (ASR)

remote.php:
new breedfunc pointer 'iosxr4-getportstatus-main' => 'iosxr4ReadInterfaceStatus'
deviceconfig.php:
+ iosxr4ReadInterfaceStatus

6 years agoadd SNMP support for Cisco WS-C2960X-48LPS-L
Alexey Andriyanov [Mon, 14 Jul 2014 16:04:38 +0000 (20:04 +0400)] 
add SNMP support for Cisco WS-C2960X-48LPS-L

6 years agoadd SNMP support for Huawei CE6850-48S4Q-EI
Alexey Andriyanov [Thu, 10 Jul 2014 05:50:53 +0000 (09:50 +0400)] 
add SNMP support for Huawei CE6850-48S4Q-EI

6 years agoadd SNMP support for Cisco WS-C2960X-24TS-LL (#1205)
Aaron Dummer [Sat, 5 Jul 2014 21:23:15 +0000 (14:23 -0700)] 
add SNMP support for Cisco WS-C2960X-24TS-LL (#1205)

6 years agoadd SNMP support for HP J9728A (#1255)
Aaron Dummer [Sat, 5 Jul 2014 21:10:02 +0000 (14:10 -0700)] 
add SNMP support for HP J9728A (#1255)

6 years agoadd SNMP support for Linksys SRW2024P (#1183)
Aaron Dummer [Sat, 5 Jul 2014 20:54:27 +0000 (13:54 -0700)] 
add SNMP support for Linksys SRW2024P (#1183)

6 years agoadd SNMP support for HP J8693A (#1251)
Aaron Dummer [Sat, 5 Jul 2014 20:19:27 +0000 (13:19 -0700)] 
add SNMP support for HP J8693A (#1251)

6 years agoadd SNMP support for Cisco CGS-2520-24TC (#1259)
Aaron Dummer [Sat, 5 Jul 2014 19:58:03 +0000 (12:58 -0700)] 
add SNMP support for Cisco CGS-2520-24TC (#1259)

6 years agoadd some patch cable sample rows
Denis Ovsienko [Sat, 14 Jun 2014 20:22:27 +0000 (00:22 +0400)] 
add some patch cable sample rows

6 years agoUpdate dictionary.php
Ray Robertson [Sat, 21 Jun 2014 15:04:53 +0000 (16:04 +0100)] 
Update dictionary.php

6 years agoadd PROXMOX Server OS
Denny Schäfer [Tue, 17 Jun 2014 13:42:23 +0000 (15:42 +0200)] 
add PROXMOX Server OS

6 years agoUpdate dictionary.php
Ray Robertson [Fri, 13 Jun 2014 14:55:58 +0000 (15:55 +0100)] 
Update dictionary.php

6 years agoadd Univention Corporate Server OS
Denny Schäfer [Wed, 11 Jun 2014 15:04:13 +0000 (17:04 +0200)] 
add Univention Corporate Server OS

6 years agoallow 3rd-party JQ.UI autocomplete inputs
Alexey Andriyanov [Thu, 26 Jun 2014 14:09:00 +0000 (18:09 +0400)] 
allow 3rd-party JQ.UI autocomplete inputs

tag-it-local.js used to override the
.ui.autocomplete.prototype._resizeMenu handler for all autocomplete
menus.

Make it doing this only for tagit's inputs.

6 years agoproper handling of generic communication errors
Alexey Andriyanov [Sun, 22 Jun 2014 06:14:17 +0000 (10:14 +0400)] 
proper handling of generic communication errors

queryDevice: check the result is not NULL, throw RTGatewayError otherwise.

6 years ago0.20.8: cut the release RackTables-0.20.8
Denis Ovsienko [Sat, 7 Jun 2014 18:47:19 +0000 (22:47 +0400)] 
0.20.8: cut the release

6 years agoadjust hints in getPatchCableHeapCursorCode()
Denis Ovsienko [Thu, 5 Jun 2014 11:47:50 +0000 (15:47 +0400)] 
adjust hints in getPatchCableHeapCursorCode()

6 years agofix opspec for "cables-heaps-upd"
Denis Ovsienko [Thu, 5 Jun 2014 11:05:23 +0000 (15:05 +0400)] 
fix opspec for "cables-heaps-upd"

Amount is not present on the form, it is managed on a separate tab.

6 years agomake LivePTR form conditional (see #1241)
Denis Ovsienko [Thu, 5 Jun 2014 10:34:33 +0000 (14:34 +0400)] 
make LivePTR form conditional (see #1241)

* renderLivePTR(): make the form conditional: only generate the elements
  if the submit would be permitted

6 years agoignore vim stuff
Denny Schäfer [Tue, 3 Jun 2014 15:08:58 +0000 (17:08 +0200)] 
ignore vim stuff

6 years agoadd HP switch
Denny Schäfer [Tue, 3 Jun 2014 15:08:38 +0000 (17:08 +0200)] 
add HP switch

6 years agoadd object container compatibility rules for Cisco UCS (#1245)
Aaron Dummer [Wed, 4 Jun 2014 22:10:37 +0000 (15:10 -0700)] 
add object container compatibility rules for Cisco UCS (#1245)

6 years agoincrease wrt_vlans field length in DB VST rule
Alexey Andriyanov [Sun, 20 Apr 2014 08:41:55 +0000 (12:41 +0400)] 
increase wrt_vlans field length in DB VST rule

There could be a VLAN list longer than 255 characters
in some environments.

Conflicts:
wwwroot/inc/upgrade.php

6 years agodictionary: add some new NEC and MikroTik devices
Denis Ovsienko [Sun, 25 May 2014 19:09:56 +0000 (23:09 +0400)] 
dictionary: add some new NEC and MikroTik devices

6 years agonew feature: patch cables accounting
Denis Ovsienko [Sun, 25 May 2014 09:05:06 +0000 (13:05 +0400)] 
new feature: patch cables accounting

This commit implements basic management of patch cables stock. It allows
for generic types of cables and connectors and comes preconfigured for
common assemblies like fiber optics, twisted pair and such. There is a
configuration page for further customization.

The user can consume/replenish an arbitrary amount of patch cables on
the cable heaps page or consume 1 cable on the port linker pop-up
through a new SELECT that suggests only the patch cable heaps compatible
with the current port type. There is a minimalistic event log for
changes in the amount.

Implementing this data model takes 6 new SQL tables with a foreign key
to the recently introduced PortOuterInterface.

* getPatchCableConnectorList(): new function
* getPatchCableTypeList(): new function
* getPatchCableConnectorOptions(): new function
* getPatchCableTypeOptions(): new function
* getPatchCableHeapSummary(): new function
* getPatchCableHeapOptionsForOIF(): new function
* getPatchCableConnectorCompat(): new function
* getPatchCableOIFCompat(): new function
* commitModifyPatchCableAmount(): new function
* commitSetPatchCableAmount(): new function
* getPatchCableHeapLogEntries(): new function
* addPatchCableHeapLogEntry(): new function
* genericAssertion(): update for "decimal" assertion type
* formatPatchCableHeapAsPlainText(): new function
* install.php: add the new SQL tables w/data
* upgrade.php: idem
* getPatchCableHeapCursorCode(): new function
* renderPatchCableHeapSummary(): new function
* renderPatchCableHeapEditor(): new function
* renderPatchCableHeapAmount(): new function
* renderSimpleTableWithOriginViewer(): new function
* renderSimpleTableWithOriginEditor(): new function
* renderPatchCableConfiguration(): new function
* renderPatchCableConnectorEditor(): new function
* renderPatchCableTypeEditor(): new function
* renderPatchCableConnectorCompatEditor(): new function
* renderPatchCableOIFCompatEditor(): new function
* navigation.php: update $indexlayout and add two new pages
* consumePatchCable(): new function
* replenishPatchCable(): new function
* setPatchCableAmount(): new function
* handlePopupPortLink(): update
* renderPopupPortSelector(): update
* triggerPatchCableHeapsConfigured(): new function

Conflicts:
ChangeLog

6 years agogeneralize IIF/OIF compatibility viewer and editor
Denis Ovsienko [Wed, 21 May 2014 11:11:26 +0000 (15:11 +0400)] 
generalize IIF/OIF compatibility viewer and editor

* renderTwoColumnCompatTableViewer(): new generic function
* renderIIFOIFCompat(): update to use above
* renderTwoColumnCompatTableEditor(): new generic function
* renderIIFOIFCompatEditor(): update to use above

6 years agoFixed interactive port menuitem 'Show all info'
xornet [Wed, 28 May 2014 12:18:58 +0000 (16:18 +0400)] 
Fixed interactive port menuitem 'Show all info'

Changed:
menuItemClicked: using global variable to spot currently clicked port

6 years agofetchAttrsForObjects: fix SQL using temp table
Alexey Andriyanov [Tue, 27 May 2014 12:39:41 +0000 (16:39 +0400)] 
fetchAttrsForObjects: fix SQL using temp table

Since fetchAttrsForObjects() is called on every listCells('object') call,
there was significant performance problem due to creation of huge temptable
and filesorting it. Sorted attr value list is needed rarely and always for
a single object, so new function getAttrValuesSorted() deals with this task now.

fetchAttrsForObjects: remove ORDER BY statement.

These funcs switched from getAttrValues() to getAttrValuesSorted():
  renderRow, renderEditRowForm, renderEditObjectForm, renderEditRackForm,
  renderRackInfoPortlet, renderObject, renderLocationPage, renderEditLocationForm.

6 years agonew per-port mac list popup menu item
xornet [Fri, 23 May 2014 16:41:31 +0000 (20:41 +0400)] 
new per-port mac list popup menu item

Add AJAX handler 'get-port-portmac' for requested port

changed:
formatPortMacHints: now can query device with getportmaclist operation for specified port
getPortInfoAJAX: new key 'get-port-portmac' in $funcmap and $opmap
switchportInfoJS: new key 'portmac' in $available_ops
navigation.php: new ajaxhandler 'get-port-portmac'
queryDevice: new function argument $args. Calls translateDeviceCommands with given args
portinfo.js:
  new menuitem 'Show port learned MACs' in menu_item_candidates
  menuItemClicked: new request data param 'port_name'
  applyMacData: Change popup-box dynamic block if it exists instead of just adding it

Conflicts:
ChangeLog

Conflicts:
ChangeLog

6 years agoAdd getportmaclist device operation
xornet [Fri, 16 May 2014 14:28:16 +0000 (18:28 +0400)] 
Add getportmaclist device operation

changed:
ios12TranslatePushQueue: new getportmaclist operation case
vrp53TranslatePushQueue: idem
vrp55TranslatePushQueue: idem
vrp85TranslatePushQueue: idem
ftos8TranslatePushQueue: idem
eos4TranslatePushQueue: idem
ros11TranslatePushQueue: idem
dlinkTranslatePushQueue: idem
linuxTranslatePushQueue: idem

remote.php: new $breedfunc keys {breed}-getportmaclist-main
for breeds ios12, vrp53, vrp55, vrp85, nxos4, dlink, linux, ftos8, eos4, ros11

6 years agosnmp: detectSoftwareType handles VRP 8.x
Alexey Andriyanov [Mon, 26 May 2014 10:51:52 +0000 (14:51 +0400)] 
snmp: detectSoftwareType handles VRP 8.x

6 years agogetPortOIFRefc: optimize query, use SQL index
Alexey Andriyanov [Thu, 22 May 2014 14:36:18 +0000 (18:36 +0400)] 
getPortOIFRefc: optimize query, use SQL index

6 years agorenderIPSpace: ignore non-existent eid error
Alexey Andriyanov [Thu, 22 May 2014 14:33:35 +0000 (18:33 +0400)] 
renderIPSpace: ignore non-existent eid error

6 years agojun10 lldp: forgot to remove debugging command
Alexey Andriyanov [Thu, 22 May 2014 12:26:38 +0000 (16:26 +0400)] 
jun10 lldp: forgot to remove debugging command

6 years agoupdate: link status feature is available on Juniper
xornet [Tue, 13 May 2014 11:31:07 +0000 (15:31 +0400)] 
update: link status feature is available on Juniper

Conflicts:
ChangeLog

6 years agoupdate 1000Base-LX10 and add 1000Base-EX
Denis Ovsienko [Tue, 13 May 2014 12:00:34 +0000 (16:00 +0400)] 
update 1000Base-LX10 and add 1000Base-EX

6 years agoreplace addIIFOIFCompat() with tableHandler()
Denis Ovsienko [Sat, 10 May 2014 18:21:10 +0000 (22:21 +0400)] 
replace addIIFOIFCompat() with tableHandler()

6 years agoadd more 40G and 100G standards
Denis Ovsienko [Sat, 10 May 2014 18:12:09 +0000 (22:12 +0400)] 
add more 40G and 100G standards

6 years agosimplify argument of getPortIIFStats()
Denis Ovsienko [Sat, 10 May 2014 17:27:12 +0000 (21:27 +0400)] 
simplify argument of getPortIIFStats()

The wrapping array was of no use.

6 years agoadjust TD alignment in dictionary chapter tables
Denis Ovsienko [Sat, 10 May 2014 17:05:03 +0000 (21:05 +0400)] 
adjust TD alignment in dictionary chapter tables

Integers in a column read better aligned to the right.

6 years agoupdate comment for git instead of Subversion
Denis Ovsienko [Fri, 9 May 2014 20:37:58 +0000 (00:37 +0400)] 
update comment for git instead of Subversion

6 years agoadjust icons in renderEditAttributesForm()
Denis Ovsienko [Fri, 9 May 2014 11:31:50 +0000 (15:31 +0400)] 
adjust icons in renderEditAttributesForm()

6 years agotrim argument of l2addressForDatabase() (#1215)
Denis Ovsienko [Thu, 8 May 2014 12:01:38 +0000 (16:01 +0400)] 
trim argument of l2addressForDatabase() (#1215)

6 years agoupdate copyright years
Denis Ovsienko [Tue, 6 May 2014 19:01:57 +0000 (23:01 +0400)] 
update copyright years

6 years agoimprove handling of image generation errors
Denis Ovsienko [Tue, 6 May 2014 07:43:37 +0000 (11:43 +0400)] 
improve handling of image generation errors

Adjust the code flow to make the right use of exceptions: whether there
is an image generation error, instead of deciding what to do define
exactly what happened and leave the actions up to the exception handler.

* exceptions.php: introduce RTImageError exception class, make the
  inline images constants and add new images
* index.php: make sure an image exception is always an RTImageError
* renderErrorImage(): deprecate
* renderAccessDeniedImage(): deprecate
* renderProgressBarError(): deprecate
* castRackImageException(): new function, an exception class convertor
* createTrueColorOrThrow(): new function, a PHP-GD error detector
* dispatchImageRequest(): don't do any local dispatching, convert
  exceptions to RTImageError where it makes sense
* printRackThumbImage(): use createTrueColorOrThrow()
* renderProgressBarImage(): ditto, throw only RTImageError
* renderProgressBar4Image(): ditto

6 years agoadd some Dell switches
Denis Ovsienko [Mon, 5 May 2014 13:17:47 +0000 (17:17 +0400)] 
add some Dell switches

6 years agoadd .gitattributes for git-archive
Denis Ovsienko [Mon, 5 May 2014 13:18:00 +0000 (17:18 +0400)] 
add .gitattributes for git-archive

6 years agoFixed indent and id number
Graham Williamson [Sun, 4 May 2014 10:02:59 +0000 (20:02 +1000)] 
Fixed indent and id number

6 years agoAdd items to dictionary
Graham Williamson [Thu, 1 May 2014 05:32:17 +0000 (15:32 +1000)] 
Add items to dictionary

6 years agoupdate Juniper EX switches in dictionary
Graham Williamson [Fri, 25 Apr 2014 13:04:56 +0000 (17:04 +0400)] 
update Juniper EX switches in dictionary

Added some missing Juniper EX4200 series switches to dictionary. Removed
space in model entity from existing EX series switches IAW Juniper's
naming standard.

6 years agoUpdate dictionary.php
Ray Robertson [Wed, 23 Apr 2014 09:44:56 +0000 (10:44 +0100)] 
Update dictionary.php

6 years agonew {$client_x.x.x.x} auto tag
Alexey Andriyanov [Sun, 20 Apr 2014 07:59:59 +0000 (11:59 +0400)] 
new {$client_x.x.x.x} auto tag

Conflicts:
ChangeLog

6 years agoadd a couple new Pica8 switches
Denis Ovsienko [Tue, 25 Mar 2014 13:35:01 +0000 (17:35 +0400)] 
add a couple new Pica8 switches

6 years agocallScript: wrong exit code bugfix
Alexey Andriyanov [Thu, 6 Mar 2014 18:01:46 +0000 (22:01 +0400)] 
callScript: wrong exit code bugfix

6 years agocallScript: export child resourse via global var
Alexey Andriyanov [Thu, 6 Mar 2014 16:31:43 +0000 (20:31 +0400)] 
callScript: export child resourse via global var

The proc_open resulting resource may be needed outside the callScript()
function if a user has signal handlers. E.g., a user may want to limit
the execution time of a gateway scipt using the pcntl_alarm(). In that
case the child process may need to be terminated explicitly using the
$script_child_res global resource.

6 years agoAPI to retrieve the newly created entity ID
Alexey Andriyanov [Thu, 6 Mar 2014 16:40:28 +0000 (20:40 +0400)] 
API to retrieve the newly created entity ID

When you implement a plugin that need to process the newly created
entity (by chaining after the original ophandler), you need to know the
entity id. lastInsertID() is not a choise since there may be multiple
inserts to different tables in the original ophandler.

lastCreated: new function to track or return the last created IDs
getLastCreatedId: wrapper around lastCreated(), filtering the last
created ID of a given realm.

these functions changed to call lastCreated():
commitAddObject
commitAddPort
commitCreateUserAccount
createIPv4Prefix
createIPv6Prefix
addVService
addVSG
createVLANDomain
addRStoRSPool
commitCreateRSPool
tableHandler

6 years agoSNMP support for Cisco 2960X-24PS-L, 2960X-24PD-L
Alexey Andriyanov [Tue, 4 Mar 2014 14:16:54 +0000 (18:16 +0400)] 
SNMP support for Cisco 2960X-24PS-L, 2960X-24PD-L

Conflicts:
ChangeLog

6 years agosyncdomain: use flock, not file existence
Denis Ovsienko [Wed, 4 Jun 2014 12:30:48 +0000 (16:30 +0400)] 
syncdomain: use flock, not file existence

There were cases when syncdomain was terminated abnormally, keeping the
lock file existing. After that the syncdomain was not able to resume
until the lockfile was deleted.

This patch uses flock(), adds ability to disable locking logic
(--nolock), and to print significant errors to the STDERR (--stderr) to inform
sysadmin using mail.

6 years agofixup charset and collation in PortOuterInterface
Denis Ovsienko [Tue, 3 Jun 2014 10:51:00 +0000 (14:51 +0400)] 
fixup charset and collation in PortOuterInterface

6 years agomove port OIFs from dictionary to a separate table
Denis Ovsienko [Sat, 10 May 2014 13:25:56 +0000 (17:25 +0400)] 
move port OIFs from dictionary to a separate table

Port outer interfaces don't actually belong to the dictionary, the
reason for keeping that data there was to reuse the infrastructure.
However, with tableHandler() implemented that becomes less important
than missing foreign keys.

This change removes dictionary chapter 2, moves the outer interfaces
rows to a table of their own, much like the inner interfaces, and adds 3
new foreign keys that reference the new table.

* fetchPortList(): fetch data from PortOuterInterface instead of
  Dictionary
* getPortOIFCompat(): idem
* getPortInterfaceCompat(): idem
* getExistingPortTypeOptions(): idem
* getPortOIFOptions(): idem
* getPortIIFStats(): idem
* renderDataIntegrityReport(): idem and remove checks that duplicate the
  new foreign keys and update the foreign keys list
* getChapterRefc(): move POI-specific query to a new function
* getPortOIFRefc(): the new function
* dictionary.php: remove the contents of chapter 2
* functions.php: remove CHAP_PORTTYPE constant
* install.php: make the changes to schema
* upgrade.php: idem and add a section for 0.20.8
* renderPortOIFViewer(): new function
* renderPortOIFEditor(): new function
* navigation.php: register new page for POI management
* ophandlers.php: update $opspec_list for PortOuterInterface

Conflicts:
wwwroot/inc/upgrade.php

6 years agointroduce getPortOIFOptions()
Denis Ovsienko [Thu, 8 May 2014 16:59:16 +0000 (20:59 +0400)] 
introduce getPortOIFOptions()

* getPortOIFOptions(): new function, although just a wrapper for
  readChapter() right now
* renderOIFCompatEditor(): update
* renderAutoPortsForm(): update
* renderIIFOIFCompatEditor(): update

6 years agobugfix: LLDP neighbors was empty for some Junipers
Alexey Andriyanov [Mon, 2 Jun 2014 12:00:27 +0000 (16:00 +0400)] 
bugfix: LLDP neighbors was empty for some Junipers

jun10ReadLLDPStatus: fix regexps to comply to different JunOS output
formats

6 years agobugfix: popup port linker was broken
Alexey Andriyanov [Fri, 23 May 2014 08:13:57 +0000 (12:13 +0400)] 
bugfix: popup port linker was broken

findSparePorts: switch to PortOuterInterface table (Dictionary was used
before)

6 years agobugfix: duplicate rows in TagStorage for racks
Alexey Andriyanov [Tue, 20 May 2014 11:42:44 +0000 (15:42 +0400)] 
bugfix: duplicate rows in TagStorage for racks

When a rack is created with taglist specified, the
produceTagsForNewRecord() call took place 2 times: first from
commitAddObject with the 'object' realm, and then again from an
ophandler with the 'rack' realm.

Removed the ophandler calls to produceTagsForNewRecord() and fixed the
commitAddObject to respect pseudo-realms (racks, locations, rows)

6 years agogetLocationChildrenList: returned array should only include unique values
Aaron Dummer [Wed, 21 May 2014 20:09:52 +0000 (13:09 -0700)] 
getLocationChildrenList: returned array should only include unique values
getObjectContentsList: idem
getTagChildrenList: idem

6 years agobugfix: Native vlan on Huawei trunk ports no longer gets to the allowed vlans list
xornet [Tue, 13 May 2014 11:19:32 +0000 (15:19 +0400)] 
bugfix: Native vlan on Huawei trunk ports no longer gets to the allowed vlans list

6 years agostring_insert_hrefs: fix PHP<5.3.0 incompatibility
Alexey Andriyanov [Sun, 20 Apr 2014 08:26:00 +0000 (12:26 +0400)] 
string_insert_hrefs: fix PHP<5.3.0 incompatibility

this fixes the #1195 issue

6 years agobugfix: renderCellList: $celllist was ignored
Alexey Andriyanov [Sun, 20 Apr 2014 08:06:06 +0000 (12:06 +0400)] 
bugfix: renderCellList: $celllist was ignored

6 years agoUpdate README with nginx and php5-fpm conf
Michał Sochoń [Mon, 31 Mar 2014 18:13:03 +0000 (20:13 +0200)] 
Update README with nginx and php5-fpm conf

I've been using Debian 7 and nginx + php5-fpm since December 2013 and
haven't noticed any issues.

The only thing that has noticeable impact is php scipt caching on nginx
side, but then admin makes it on purpose. By default this feature is not
enabled, but I've decided to add some info about it.

Added extra info for server_name variable for nginx, apparently this
surfaced after update from 0.20.6 to 0.20.7.

6 years agofinalize the previous change
Denis Ovsienko [Tue, 1 Apr 2014 06:24:35 +0000 (10:24 +0400)] 
finalize the previous change

6 years agoUpdate auth.php with LDAP option to specify port
Michał Sochoń [Mon, 31 Mar 2014 19:00:19 +0000 (21:00 +0200)] 
Update auth.php with LDAP option to specify port

We use Zentyal which used different port for LDAP read only queries, by default on port 390.

Below example configrarion, hope someone will find it helpful someday. Remember to adjust to your needs.

$LDAP_options = array
(
'server' => 'zentyal-dc.example.com',
'port' => 390,
'domain' => '',
'search_attr' => 'uid',
'search_dn' => 'dc=dir,dc=example,dc=com',
 // The following credentials will be used when searching for the user's DN:
'search_bind_rdn' => 'cn=zentyalro,dc=dir,dc=xstream,dc=dk',
'search_bind_password' => 'enter_pass_here',
'displayname_attrs' => 'cn',
'options' => array (LDAP_OPT_PROTOCOL_VERSION => 3),
'use_tls' => 0,         // 0 == don't attempt, 1 == attempt, 2 == require
);

6 years agoFix UI reset after MGMT_PROTOS change in 0.20.6
Alex Brett [Fri, 28 Mar 2014 12:43:39 +0000 (12:43 +0000)] 
Fix UI reset after MGMT_PROTOS change in 0.20.6

In 0.20.6 TELNET_OBJS_LISTSRC, SSH_OBJS_LISTSRC, and RDP_OBJS_LISTSRC
were replaced with a single MGMT_PROTOS option, but the UI reset code
was not updated and so still attempted to reset the objects which no
longer existed...

6 years agoimprove previous commit: also fix locations
Denis Ovsienko [Wed, 26 Mar 2014 13:28:00 +0000 (17:28 +0400)] 
improve previous commit: also fix locations