racktables
8 years agoCleanup in files that is not php
Michael Holm [Mon, 22 Oct 2012 22:01:54 +0000 (00:01 +0200)] 
Cleanup in files that is not php

8 years agoAdded some code cleanup.
Michael Holm [Mon, 22 Oct 2012 21:58:01 +0000 (23:58 +0200)] 
Added some code cleanup.

8 years agoIP PTR import ophandler changed slightly
Alexey Andriyanov [Mon, 22 Oct 2012 16:44:15 +0000 (20:44 +0400)] 
IP PTR import ophandler changed slightly

importPTRData: proper handling of errors, check if IPs belong to network
updateV4Address, updateV6Address: added comment parameter

8 years agosetMessage: be quiet in script_mode
Alexey Andriyanov [Mon, 22 Oct 2012 09:49:42 +0000 (13:49 +0400)] 
setMessage: be quiet in script_mode

8 years agouse $result uniformly for DBO result
Denis Ovsienko [Sat, 20 Oct 2012 11:49:43 +0000 (15:49 +0400)] 
use $result uniformly for DBO result

Update the following functions to use $result instead of $query:

* getRacks()
* getAllUnlinkedFiles()
* getFilesOfEntity()
* getFile()
* getFileCache()
* getFileLinks()
* findFileByName()

8 years agofix indentation in getFileLinks()
Denis Ovsienko [Sat, 20 Oct 2012 11:45:05 +0000 (15:45 +0400)] 
fix indentation in getFileLinks()

8 years agoadd a comment about $breedfunc
Denis Ovsienko [Sat, 20 Oct 2012 11:36:44 +0000 (15:36 +0400)] 
add a comment about $breedfunc

8 years agotreat UserAccount.user_realname as NULL column
Denis Ovsienko [Fri, 19 Oct 2012 03:13:19 +0000 (07:13 +0400)] 
treat UserAccount.user_realname as NULL column

8 years agobugfix: New Subnet is added wrong (#643)
Alexey Andriyanov [Thu, 18 Oct 2012 18:20:01 +0000 (22:20 +0400)] 
bugfix: New Subnet is added wrong (#643)

ip4_bin2int: check for strange case

8 years agointroduce reduceSubarraysToColumn()
Denis Ovsienko [Thu, 18 Oct 2012 13:13:01 +0000 (17:13 +0400)] 
introduce reduceSubarraysToColumn()

The new function implements a common array transformation used by some
functions in database.php. Some functions are updated to use it, alone
or combined with reindexById():

* getLocations()
* getRows()
* getPortIDs()
* getAllUnlinkedFiles()
* getExistingPortTypeOptions()
* getPortTypeUsageStatistics()
* getVLANDomainOptions()
* getVLANSwitches()
* getVLANInfo()
* getVLANIPv4Options()
* getVLANIPv6Options()

8 years agouse reindexById() in 9 more functions
Denis Ovsienko [Thu, 18 Oct 2012 12:50:38 +0000 (16:50 +0400)] 
use reindexById() in 9 more functions

This change replaces a while()-based pattern with a single reindexById()
call in the following functions:

* getAllRows()
* getRacks()
* getIPv6AddressSearchResult()
* loadConfigCache()
* loadUserConfigCache()
* loadEntityTags()
* getChapterList()
* getVLANDomainStats()
* getDomainVLANs()

8 years agoremove single-use var from getObjectParentCompat()
Denis Ovsienko [Thu, 18 Oct 2012 11:45:16 +0000 (15:45 +0400)] 
remove single-use var from getObjectParentCompat()

8 years agouse fetchAll() in getAllIPv4Allocations()
Denis Ovsienko [Wed, 17 Oct 2012 16:04:39 +0000 (20:04 +0400)] 
use fetchAll() in getAllIPv4Allocations()

8 years agoimprove some breed functions
Denis Ovsienko [Wed, 17 Oct 2012 14:35:57 +0000 (18:35 +0400)] 
improve some breed functions

* assertDeviceBreed(): new function to wrap detectDeviceBreed()
* assertBreedFunction(): add details to error message, return function
  name
* queryDevice(): use two functions above, reduce footprint
* translateDeviceCommands(): idem

8 years agodecommission gateways.php
Denis Ovsienko [Wed, 17 Oct 2012 13:54:27 +0000 (17:54 +0400)] 
decommission gateways.php

Move the items below to remote.php, where they likely belong, and remove
gateways.php:

* $breedfunc
* detectDeviceBreed()
* validBreedFunction()
* assertBreedFunction()

8 years agoadd reference to COPYING
Denis Ovsienko [Wed, 17 Oct 2012 13:22:22 +0000 (17:22 +0400)] 
add reference to COPYING

8 years agofix Makefile for .git
Denis Ovsienko [Wed, 17 Oct 2012 10:01:05 +0000 (14:01 +0400)] 
fix Makefile for .git

8 years agoremove old gateways code
Denis Ovsienko [Wed, 17 Oct 2012 09:31:23 +0000 (13:31 +0400)] 
remove old gateways code

This change removes the following code:

* gateways/sendfile/
* gateways/deviceconfig/
* gateways/switchvlans/
* queryGateway()
* getSwitchVLANs()
* setSwitchVLANs()
* gwSendFile()
* gwRecvFile()
* gwSendFileToObject()
* gwRecvFileFromObject()
* gwRetrieveDeviceConfig()
* gwDeployDeviceConfig()
* renderVLANMembership()
* setPortVLAN()
* trigger_livevlans()

The "sendfile" and "deviceconfig" are completely obsoleted by the
current gateways API. The "switchvlans" and associated "Live VLANs"
feature is moved to the racktables-contribs repository, since "802.1Q"
feature is sufficient for most use cases.

8 years agoimplement abstract tags (#577)
Denis Ovsienko [Mon, 15 Oct 2012 17:47:24 +0000 (21:47 +0400)] 
implement abstract tags (#577)

install.php: update TagStorage and TagTree tables
upgrade.php: idem
getTagList(): update for extra column
genericAssertion(): add new "enum/yesno" assertion type
renderTagRowForViewer(): use classes for tag TRs
renderTagRowForEditor(): idem, and add "is_assignable" column
$opspec_list: update for "is_assignable" column

8 years agorenderTagTreeEditor(): set class for orphan tag TRs
Denis Ovsienko [Mon, 15 Oct 2012 17:06:10 +0000 (21:06 +0400)] 
renderTagTreeEditor(): set class for orphan tag TRs

8 years agosplit renderTagCheckbox() into 2 functions
Denis Ovsienko [Mon, 15 Oct 2012 14:41:32 +0000 (18:41 +0400)] 
split renderTagCheckbox() into 2 functions

buildTagCheckboxRows(): new function, recursive processor
printTagCheckboxTable(): new function, HTML generator
renderCellFilterPortlet(): update to use printTagCheckboxTable()
renderEntityTagsPortlet(): idem
renderNewEntityTags(): idem

8 years agobugfix: access -> trunk transition was broken on VRP 5.7
Alexey Andriyanov [Tue, 16 Oct 2012 17:48:22 +0000 (21:48 +0400)] 
bugfix: access -> trunk transition was broken on VRP 5.7

vrp55TranslatePushQueue: remove vlan 1 from newly-created trunk

8 years agovrp55Read8021QConfig: proper handling of VLAN 1
Alexey Andriyanov [Mon, 15 Oct 2012 09:59:20 +0000 (13:59 +0400)] 
vrp55Read8021QConfig: proper handling of VLAN 1

8 years agonew function formatEntityList
Alexey Andriyanov [Thu, 11 Oct 2012 13:31:11 +0000 (17:31 +0400)] 
new function formatEntityList

getNarrowObjectList: use new func
renderNewSLBItemForm: idem
- getIPv4VSOptions: removed in favour of formatEntityList
- getIPv4RSPoolOptions: idem

renderSLBTripletsEdit: new item form renderer can be overrided now

8 years agoslb: ability to specify multiple RS ports
Alexey Andriyanov [Thu, 11 Oct 2012 05:39:40 +0000 (09:39 +0400)] 
slb: ability to specify multiple RS ports

SLBTriplet::generateConfig: multiply RS server generation by RS ports

8 years agofix some bugs in UCS gateway
Jeff Silberman [Wed, 10 Oct 2012 09:51:52 +0000 (13:51 +0400)] 
fix some bugs in UCS gateway

Bug showed up where bad handles were getting called for Logout, and
subsequently throwing exceptions in UCS Python SDK. The changes to
"ucssdk" below fix all of those.

Also in "deviceconfig.php" $replies will only be "1", if a UCS login
fails.

8 years agoslb macro parser API update
Alexey Andriyanov [Mon, 8 Oct 2012 11:37:34 +0000 (15:37 +0400)] 
slb macro parser API update

MacroParser::createParser: triplet is passed as a parameter

this allows user to define his own macros based on the SLB triplet
fields. Example: custom redeclarable macro based on load balancer
object's properties

8 years agofix double-TR in renderTagTree()
Denis Ovsienko [Mon, 8 Oct 2012 09:59:00 +0000 (13:59 +0400)] 
fix double-TR in renderTagTree()

8 years agorefresh renderTagTreeEditor()
Denis Ovsienko [Sat, 6 Oct 2012 15:47:10 +0000 (19:47 +0400)] 
refresh renderTagTreeEditor()

Use printSelect() and reorder the code to make table TDs better visible;
increase TABINDEX steps.

8 years agoSNMP: list NETGEAR GSM7352Sv2 (#571)
Denis Ovsienko [Sat, 6 Oct 2012 09:26:46 +0000 (13:26 +0400)] 
SNMP: list NETGEAR GSM7352Sv2 (#571)

8 years agoSNMP: list PowerConnect 6248 (#516)
Denis Ovsienko [Sat, 6 Oct 2012 08:46:27 +0000 (12:46 +0400)] 
SNMP: list PowerConnect 6248 (#516)

8 years agoproxyCactiRequest(): request rra_id=1 (#466)
Denis Ovsienko [Fri, 5 Oct 2012 13:04:14 +0000 (17:04 +0400)] 
proxyCactiRequest(): request rra_id=1 (#466)

According to the bug report, some Cacti instances require an explicit
rra_id parameter (instead of selecting RRA ID 1 by default). Add the
argument to make them happy.

8 years ago0.20.1: cut the release RackTables-0.20.1
Alexey Andriyanov [Thu, 4 Oct 2012 12:06:14 +0000 (16:06 +0400)] 
0.20.1: cut the release

8 years agobugfix: if cacti server was forgotten if no graphs were exist
Alexey Andriyanov [Thu, 4 Oct 2012 11:56:02 +0000 (15:56 +0400)] 
bugfix: if cacti server was forgotten if no graphs were exist

8 years agobugfix: cacti server count fetching was broken
Alexey Andriyanov [Thu, 4 Oct 2012 11:30:36 +0000 (15:30 +0400)] 
bugfix: cacti server count fetching was broken

8 years agochanged the order of inserts in favour of foreign keys
Alexey Andriyanov [Thu, 4 Oct 2012 11:09:14 +0000 (15:09 +0400)] 
changed the order of inserts in favour of foreign keys

8 years agoresetUIConfig: fix objtype id in IPV4OBJ_LISTSRC
Alexey Andriyanov [Thu, 4 Oct 2012 10:51:17 +0000 (14:51 +0400)] 
resetUIConfig: fix objtype id in IPV4OBJ_LISTSRC

8 years agopartially revert the commit f10279 by Stephen Groat
Alexey Andriyanov [Thu, 4 Oct 2012 10:14:22 +0000 (14:14 +0400)] 
partially revert the commit f10279 by Stephen Groat

some CSS styles do need white-space: pre instead of pre-wrap

8 years agosupport for emulating of logged-in user in script mode
Alexey Andriyanov [Wed, 3 Oct 2012 15:16:30 +0000 (19:16 +0400)] 
support for emulating of logged-in user in script mode

authenticate: if called manually when $script_mdode == TRUE and
remote_username set, fills user-given tags in context.

8 years agotrim whitespaces from object name and port name
Alexander Balezin [Wed, 3 Oct 2012 13:03:34 +0000 (17:03 +0400)] 
trim whitespaces from object name and port name

8 years agoauthenticated_via_ldap: debugging of 'LDAP caching error' exception
Alexey Andriyanov [Wed, 3 Oct 2012 11:12:02 +0000 (15:12 +0400)] 
authenticated_via_ldap: debugging of 'LDAP caching error' exception

8 years agoanother fix for $debug_mode var
Alexey Andriyanov [Wed, 3 Oct 2012 11:07:15 +0000 (15:07 +0400)] 
another fix for $debug_mode var

$debug_mode var treatment was moved into the genHTMLPage function

8 years agobugfix: $debug_mode global var caused authentication problems
Alexey Andriyanov [Wed, 3 Oct 2012 10:32:13 +0000 (14:32 +0400)] 
bugfix: $debug_mode global var caused authentication problems

printException: moved working with $debug_mode var here from index.php

8 years agoremoved unintended escaping of $ char
Alexey Andriyanov [Wed, 3 Oct 2012 10:06:15 +0000 (14:06 +0400)] 
removed unintended escaping of $ char

8 years agoremoved commented debug code
Alexey Andriyanov [Wed, 3 Oct 2012 10:05:26 +0000 (14:05 +0400)] 
removed commented debug code

8 years agoadd bug reference to 0.20.1 block
Denis Ovsienko [Tue, 2 Oct 2012 13:29:50 +0000 (17:29 +0400)] 
add bug reference to 0.20.1 block

8 years agobugfix: IPv4 supernet capacity does not reflect child subnet allocations (#611)
Alexey Andriyanov [Tue, 2 Oct 2012 09:47:39 +0000 (13:47 +0400)] 
bugfix: IPv4 supernet capacity does not reflect child subnet allocations (#611)

getRenderedIPv4NetCapacity changed

8 years agoadded bcmath release note
Alexey Andriyanov [Sun, 30 Sep 2012 11:25:16 +0000 (15:25 +0400)] 
added bcmath release note

8 years agoIP addresses inherit tags from their parent networks (#375)
Alexey Andriyanov [Sun, 30 Sep 2012 11:23:04 +0000 (15:23 +0400)] 
IP addresses inherit tags from their parent networks (#375)

fixContext: use ip network's tagchain on ipaddress page

8 years agoadd SNMP support for TL-SG5426 (#590)
Aaron Dummer [Sat, 29 Sep 2012 18:27:38 +0000 (11:27 -0700)] 
add SNMP support for TL-SG5426 (#590)

8 years agoadd SNMP support for HP J9020A (#619), J9280A (#615)
Aaron Dummer [Sat, 29 Sep 2012 17:56:42 +0000 (10:56 -0700)] 
add SNMP support for HP J9020A (#619), J9280A (#615)

8 years agocheck for bcmath while upgrading/installing (#602)
Alexey Andriyanov [Fri, 28 Sep 2012 17:09:13 +0000 (21:09 +0400)] 
check for bcmath while upgrading/installing (#602)

platform_is_ok: check bcmul function

8 years agomake 'pg' parameter bypassed on ipv4net page
Alexey Andriyanov [Fri, 28 Sep 2012 16:45:19 +0000 (20:45 +0400)] 
make 'pg' parameter bypassed on ipv4net page

importPTRData, renderLivePTR: do not treat pg specially

8 years agorender all NAT endpoints using special function
Alexey Andriyanov [Fri, 28 Sep 2012 16:37:04 +0000 (20:37 +0400)] 
render all NAT endpoints using special function

getRenderedIPPortPair: new function to render IP-port pairs
renderObject: use getRenderedIPPortPair
renderIPAddress: idem
renderNATv4ForObject: idem

8 years agobugfix: renaming top-level tag is impossible
Alexey Andriyanov [Fri, 28 Sep 2012 12:02:38 +0000 (16:02 +0400)] 
bugfix: renaming top-level tag is impossible

renderTagRowForEditor: replace empty parent id to 0

8 years agoTab "Live ports" is blank if network error occurs (#489)
Alexey Andriyanov [Tue, 25 Sep 2012 12:52:53 +0000 (16:52 +0400)] 
Tab "Live ports" is blank if network error occurs (#489)

renderPortsInfo: display error message, check if getmaclist is permitted
renderDiscoveredNeighbors: display error instead of warning

8 years agofix SNMP detection for FCX 648 with L3 software
Denis Ovsienko [Mon, 24 Sep 2012 17:15:35 +0000 (21:15 +0400)] 
fix SNMP detection for FCX 648 with L3 software

8 years agolog records containing long lines are now word-wrapped (#608) by Stephen
Aaron Dummer [Sun, 23 Sep 2012 22:55:04 +0000 (15:55 -0700)] 
log records containing long lines are now word-wrapped (#608) by Stephen
Groat

8 years agofix reference to mantis ticket
Aaron Dummer [Sun, 23 Sep 2012 22:32:58 +0000 (15:32 -0700)] 
fix reference to mantis ticket

8 years agoadd Dell PowerConnect 5524/5548 to the dictionary
Aaron Dummer [Sun, 23 Sep 2012 18:30:39 +0000 (11:30 -0700)] 
add Dell PowerConnect 5524/5548 to the dictionary

8 years agoimplement multiple Cacti servers (#534)
Denis Ovsienko [Sat, 22 Sep 2012 08:58:56 +0000 (12:58 +0400)] 
implement multiple Cacti servers (#534)

The Cacti Graph feature implemented so far allowed for multiple
graphs/objects, but only one Cacti server, managed through config
options. This change enables any arbitrary amount of of Cacti servers,
all stored in a SQL table.

getCactiGraphsForObject(): update to return extra column
getCactiServers(): new function to access CactiServer SQL table
install.php: update CactiGraph, add CactiServer, remove three old
Cacti-related options
upgrade.php: add required conversion into 0.20.1 batch
renderObjectCactiGraphs(): update to work with multiple servers
renderCactiConfig(): new function
renderCactiServersEditor(): new function
resetUIConfig(): delist removed config options
dispatchImageRequest(): add handling of "server_id" argument
proxyCactiRequest(): idem
triggerCactiGraphs(): use getCactiServers()

8 years agofix missing 8021Q_EXTSYNC_LISTSRC on upgrade
Denis Ovsienko [Sat, 22 Sep 2012 08:57:30 +0000 (12:57 +0400)] 
fix missing 8021Q_EXTSYNC_LISTSRC on upgrade

8 years agoMerge branch 'master' of https://github.com/RackTables/racktables.git
Aaron Dummer [Wed, 19 Sep 2012 16:28:27 +0000 (09:28 -0700)] 
Merge branch 'master' of https://github.com/RackTables/racktables.git

8 years agobugfix: 0.19.10 moved some HW models to a different dict chapter, update
Aaron Dummer [Wed, 19 Sep 2012 16:28:19 +0000 (09:28 -0700)] 
bugfix: 0.19.10 moved some HW models to a different dict chapter, update
the type of affected objects accordingly (#609)

8 years agouse "env" for PHP and Python interpreters
Denis Ovsienko [Wed, 19 Sep 2012 07:06:19 +0000 (11:06 +0400)] 
use "env" for PHP and Python interpreters

Shell and Perl used to be available in /usr/bin on both Linux and
FreeBSD, but PHP and Python may be found either in /usr/bin or in
/usr/local/bin depending on particular host. Use of env should justify
this particular difference once and forever.

8 years agochange path to Python interpreter
Jeff Silberman [Tue, 18 Sep 2012 05:29:42 +0000 (09:29 +0400)] 
change path to Python interpreter

8 years agojustify service profile setup for UCS ComputeBlade
Jeff Silberman [Mon, 17 Sep 2012 21:06:45 +0000 (01:06 +0400)] 
justify service profile setup for UCS ComputeBlade

For server-blades that are associated to "service profiles", the domain
name needs to be included. Otherwise, service-profile names by
themselves (e.g. "EXCH-1") are not sufficiently unique.

8 years agofix PHP warning in renderObject8021QSyncPreview()
Denis Ovsienko [Mon, 17 Sep 2012 15:42:16 +0000 (19:42 +0400)] 
fix PHP warning in renderObject8021QSyncPreview()

8 years agofix PHP warning in renderObject8021QSyncSchedule()
Denis Ovsienko [Mon, 17 Sep 2012 15:15:57 +0000 (19:15 +0400)] 
fix PHP warning in renderObject8021QSyncSchedule()

8 years agofillBypassValues: forgot parameter in array_key_exists
Alexey Andriyanov [Mon, 17 Sep 2012 13:28:13 +0000 (17:28 +0400)] 
fillBypassValues: forgot parameter in array_key_exists

8 years agojustify getBypassValue() use in triggers further
Denis Ovsienko [Mon, 17 Sep 2012 10:14:52 +0000 (14:14 +0400)] 
justify getBypassValue() use in triggers further

Update the following functions to use getBypassValue() instead of
hardcoding bypass argument name. Explicit bypass assertions are no more
required.

* trigger_livevlans()
* trigger_snmpportfinder()
* trigger_isloadbalancer()
* trigger_ip()
* trigger_natv4()
* trigger_autoports()
* trigger_file_editText()
* trigger_rackspace()
* trigger_ports()
* trigger_object_8021qorder()
* trigger_ipv4net_vlanconfig()
* trigger_ipv6net_vlanconfig()
* trigger_vlan_ipv4net()
* trigger_vlan_ipv6net()

8 years agoimplement offline mgmt of 802.1Q port list (#460)
Denis Ovsienko [Sun, 16 Sep 2012 13:53:39 +0000 (17:53 +0400)] 
implement offline mgmt of 802.1Q port list (#460)

So far the only way of adding or removing 802.1Q port records was
through a sync with a live remote device. This change makes it possible
to add and remove arbitrary 802.1Q ports regardless of the normal sync
process. This feature is enabled for 802.1Q switches matching
8021Q_EXTSYNC_LISTSRC predicate.

* renderObject8021QSync(): add extra portlet
* renderObject8021QSyncPorts(): new function to render port list
  management form
* resetUIConfig(): update for new config option
* create8021QPortConfig(): new ophandler
* destroy8021QPortConfig(): new ophandler

8 years agosplit renderObject8021QSync() into 3 functions
Denis Ovsienko [Sat, 15 Sep 2012 18:17:20 +0000 (22:17 +0400)] 
split renderObject8021QSync() into 3 functions

This change adds two new functions, renderObject8021QSyncSchedule() and
renderObject8021QSyncPreview(), which output the contents of the left
and right columns of the 802.1Q sync tab respectively.
renderObject8021QSync() is updated to output an error message instead of
the live preview only (not instead of the whole tab contents).

8 years agofix channel-group status parsing for ROS
Denis Ovsienko [Mon, 17 Sep 2012 06:56:30 +0000 (10:56 +0400)] 
fix channel-group status parsing for ROS

8 years agoupdate: confirmation boxes when clearing attribute values (#565)
Alexey Andriyanov [Mon, 17 Sep 2012 05:40:32 +0000 (09:40 +0400)] 
update: confirmation boxes when clearing attribute values (#565)

changed functions:
renderEditObjectForm
renderEditRackForm
renderEditLocationForm

8 years agobugfix: paging reset in LivePTR (#421)
Alexey Andriyanov [Mon, 17 Sep 2012 05:31:24 +0000 (09:31 +0400)] 
bugfix: paging reset in LivePTR (#421)

changed functions:
renderLivePTR
importPTRData

8 years agoadded $debug_mode global var
Alexey Andriyanov [Mon, 17 Sep 2012 05:28:51 +0000 (09:28 +0400)] 
added $debug_mode global var

8 years agobugfix: ports and IPs highlighting is kept after edit operation
Alexey Andriyanov [Mon, 17 Sep 2012 05:22:53 +0000 (09:22 +0400)] 
bugfix: ports and IPs highlighting is kept after edit operation

bypass-handling code was unified. In some cases bypass_tabs were
handled, in some - were not.

fillBypassValues: new func to collect bypass http params
fixContext: use getBypassValue
buildRedirectURL: use fillBypassValues
makeHrefProcess: idem
showTabs: idem

removed unnesessary params from makeHrefProcess calls in interface.php

8 years agoadd foreign keys to delete rack history data when a rack is deleted
Aaron Dummer [Sun, 16 Sep 2012 21:38:03 +0000 (14:38 -0700)] 
add foreign keys to delete rack history data when a rack is deleted
(#604)

8 years agocheckObjectUniqueness() - wasn't working when adding new Racks/Rows
Aaron Dummer [Sun, 16 Sep 2012 20:30:37 +0000 (13:30 -0700)] 
checkObjectUniqueness() - wasn't working when adding new Racks/Rows

8 years agorenderRow() - fix exception thrown when the row is not assigned to a
Aaron Dummer [Sun, 16 Sep 2012 18:39:40 +0000 (11:39 -0700)] 
renderRow() - fix exception thrown when the row is not assigned to a
location

8 years agocommitUpdateRack() - remove redundant recordObjectHistory() call
Aaron Dummer [Sun, 16 Sep 2012 18:27:12 +0000 (11:27 -0700)] 
commitUpdateRack() - remove redundant recordObjectHistory() call

8 years agobugfix: Location attributes weren't being saved (#605)
Aaron Dummer [Sun, 16 Sep 2012 18:16:34 +0000 (11:16 -0700)] 
bugfix: Location attributes weren't being saved (#605)

8 years agogetNATv4ForObject: get rid of INET_NTOA in SQL
Alexey Andriyanov [Sat, 15 Sep 2012 20:49:45 +0000 (00:49 +0400)] 
getNATv4ForObject: get rid of INET_NTOA in SQL

8 years agobugfix: IPs in NAT rules were displayed as ints
Alexey Andriyanov [Sat, 15 Sep 2012 20:37:08 +0000 (00:37 +0400)] 
bugfix: IPs in NAT rules were displayed as ints

scanIPv4Space: post-format fetched IPs

8 years agogetRenderedIPv4NetCapacity: fix decimal scale
Alexey Andriyanov [Sat, 15 Sep 2012 20:26:11 +0000 (00:26 +0400)] 
getRenderedIPv4NetCapacity: fix decimal scale

8 years agobugfix: fixed infinite loop when creating /0 nets
Alexey Andriyanov [Sat, 15 Sep 2012 18:56:53 +0000 (22:56 +0400)] 
bugfix: fixed infinite loop when creating /0 nets

fillIPNetsCorrelation: check for crossing 0 after ip_next()
fillIPSpareListBstr: idem

8 years agobugfix: IPv4 network capacity (#602)
Alexey Andriyanov [Sat, 15 Sep 2012 18:46:02 +0000 (22:46 +0400)] 
bugfix: IPv4 network capacity (#602)

ip4_mask_size: in boundary cases the result is hardcoded literally
getIPv4OwnRangeSize: removed
getRenderedIPv4NetCapacity: use PHP BC Math functions when dealing with the results of ip4_mask_size.

8 years agouse getBypassValue() in trigger functions
Denis Ovsienko [Sat, 15 Sep 2012 15:46:56 +0000 (19:46 +0400)] 
use getBypassValue() in trigger functions

* trigger_object_8021qports()
* trigger_object_8021qsync()

8 years agochange capitalization of some Location-related fields
Aaron Dummer [Fri, 14 Sep 2012 15:44:47 +0000 (08:44 -0700)] 
change capitalization of some Location-related fields

8 years agorevert last commit (f8c8b7)
Alexey Andriyanov [Fri, 14 Sep 2012 13:55:33 +0000 (17:55 +0400)] 
revert last commit (f8c8b7)

The root of this issue is that Nexus 7000 switches have different
port config syntax according to the type of linear card (F1/F2).

The issue can not be fixed by introducing new breed, so I'm giving
up and leaving this thing as is.

8 years agobugfix: 802.1Q: NX-OS gateway did detect ip ports as switched
Alexey Andriyanov [Fri, 14 Sep 2012 11:53:13 +0000 (15:53 +0400)] 
bugfix: 802.1Q: NX-OS gateway did detect ip ports as switched

nxos4PickSwitchportCommand: do not assume access mode without
'switchport mode' and 'switchport' commands

8 years agoOuterjoin Missing
James Tutton [Fri, 14 Sep 2012 10:02:10 +0000 (11:02 +0100)] 
Outerjoin Missing

8 years agoAdd Location Based Info To Rackrow Table
James Tutton [Fri, 14 Sep 2012 07:46:55 +0000 (08:46 +0100)] 
Add Location Based Info To Rackrow Table

Minor modifiication to SQL query

8 years agoadd a new 'management interface' object type
Aaron Dummer [Sat, 8 Sep 2012 23:10:36 +0000 (16:10 -0700)] 
add a new 'management interface' object type

8 years agoinitial support for Cisco UCS
Jeff Silberman [Fri, 7 Sep 2012 12:56:37 +0000 (16:56 +0400)] 
initial support for Cisco UCS

Signed-off-by: Denis Ovsienko <infrastation@yandex.ru>
This commit is based on Jeff's patch he contributed to RackTables as a
GPL piece of work. I had to justify most of fine details in the code
and its layering, but the overall approach was preserved.

UCS is presently the only use case of queryDevice() with HTTP-supplied
username and password possible. This commit is an initial attempt to
handle such use cases.

New code:

* getObjectContentsList(): returns a list of object's nested objects
* ucsTranslatePushQueue(): maps PHP pseudocodes to UCS command(s)
* ucsReadInventory(): converts a plaintext listing of components into a
  PHP array
* renderEditUCSForm(): renders the HTML contents of the new "UCS" tab
* autoPopulateUCS(): ophandler to import the contents of a UCS domain
* cleanupUCS(): ophandler to remove the contents of a UCS domain
* trigger_ucs(): a trigger enabling the "UCS" tab on UCS domains' object
  page
* gateways/ucssdk: a Python backend to UCS SDK

Updated code:

* interface-lib.php: register a new PNG image
* dictionary.php: introduce a server chassis pseudo-model for a UCS
  domain
* install.php: update the default value of IPV4OBJ_LISTSRC option
* resetUIConfig(): update resetting of IPV4OBJ_LISTSRC option for
  consistency
* navigation.php: register new conditional "UCS" tab of an object's page
  and its associated functions
* detectDeviceBreed(): update to detect a new "ucs" breed
* $breedfunc: register the functions of the new "ucs" breed
* queryTerminal(): update for the new "ucs" breed and its first "ucssdk"
  protocol

Further work is required to align the RackTables data model with regard
to management instances and their association with physical objects, but
this is so far left out of scope of this implementation.

8 years agorename one of two renderFilePreview() funcs (#603)
Denis Ovsienko [Thu, 13 Sep 2012 08:39:54 +0000 (12:39 +0400)] 
rename one of two renderFilePreview() funcs (#603)

There used to be two function with the same name, one in solutions.php
and another in interface.php. Since the module dispatcher in index.php
treats these two files mutually exclusive, this name clash remained
unnoticed until a user forced unconditional inclusion of interface.php
in a plugin file. This commit renames the function in solutions.php to
renderImagePreview().

8 years agospelling
Denis Ovsienko [Wed, 12 Sep 2012 09:08:55 +0000 (13:08 +0400)] 
spelling

8 years agorefine some ROS-specific parsing code
Denis Ovsienko [Wed, 12 Sep 2012 08:50:25 +0000 (12:50 +0400)] 
refine some ROS-specific parsing code

ros11ReadMacList(): adjust finite automata for reliable detection of end
of table and less code
ros11ReadInterfaceStatus(): idem, explodeTableLine() is no more required

8 years agoD-Link (#533) and Linux (#541) support in gateways
Ilya Evseev [Thu, 1 Mar 2012 13:31:35 +0000 (13:31 +0000)] 
D-Link (#533) and Linux (#541) support in gateways

Conflicts:

ChangeLog
wwwroot/inc/deviceconfig.php
wwwroot/inc/gateways.php

Signed-off-by: Denis Ovsienko <infrastation@yandex.ru>
This commit forward-ports two features from maintenance-0.19.x to master
with the following changes:

* D-Link enable password is not explicitly supported
* connector files are dismissed
* breed-specific functions are modified to match 0.20.x framework
* spacing/indentation justifications