racktables
20 months agofixup some whitespace
Denis Ovsienko [Wed, 4 Jul 2018 14:18:37 +0000 (15:18 +0100)] 
fixup some whitespace

* renderEntityTagsPortlet()
* listCells()
* spotEntity()
* switchportInfoJS()

[skip ci]

20 months agofix some language in comments
Denis Ovsienko [Tue, 3 Jul 2018 13:05:56 +0000 (14:05 +0100)] 
fix some language in comments

"We" isn't a good word for making comments on a technical subject.
Remove some obsolete comments altogether.

[skip ci]

20 months agoupgrade CodeMirror from 5.37.0 to 5.39.0
Denis Ovsienko [Tue, 3 Jul 2018 07:41:03 +0000 (08:41 +0100)] 
upgrade CodeMirror from 5.37.0 to 5.39.0

[skip ci]

21 months agoremove obsolete code from buildOpspecColumns()
Denis Ovsienko [Thu, 28 Jun 2018 10:01:52 +0000 (11:01 +0100)] 
remove obsolete code from buildOpspecColumns()

Since commit 3c3487c (delivered in release 0.20.11) 'if_empty' was not
supposed to appear in the $opspec_list structures. It has been more than
2 years since the change and it is the time to remove the obsolete code.

21 months agospell remaining "unsigned" and "natural" cases
Denis Ovsienko [Thu, 28 Jun 2018 08:50:08 +0000 (09:50 +0100)] 
spell remaining "unsigned" and "natural" cases

* getPortInfoAJAX()
* updatePortRsvAJAX()
* updateCableIdAJAX()
* getAutocompleteListAJAX()
* fixContext()
* renderRackCodeViewer()
* addBulkPorts()
* updateObject()
* updateObjectAttributes()
* addMultipleObjects()
* addLotOfObjects()
* updateTag()
* addLocation()
* updateLocation()
* deleteLocation()
* updateRow()
* save8021QPorts()
* resolve8021QConflicts()
* cloneVST()
* updVSTRule()
* setPatchCableAmount()
* index.php

21 months agospell "natural" assertion type in more functions
Denis Ovsienko [Wed, 27 Jun 2018 17:24:51 +0000 (18:24 +0100)] 
spell "natural" assertion type in more functions

* addBulkPorts()
* updIPAllocation()
* delIPAllocation()
* addIPAllocation()
* delIPv4Prefix()
* delIPv6Prefix()
* updateUser()
* supplementAttrMap()
* updateObject()
* updateObjectAttributes()
* addMultipleObjects()
* linkObjects()
* deleteObject()
* updateUI()
* saveMyPreferences()
* deleteVService()
* updateRealServer()
* updateVService()
* addLoadBalancer()
* deleteRSPool()
* importPTRData()
* updateTag()
* rollTags()
* updateLocation()
* deleteLocation()
* addRow()
* addRack()
* updateRack()
* querySNMPData()
* linkFileToEntity()
* unlinkFile()
* deleteFile()
* add8021QOrder()
* del8021QOrder()
* save8021QPorts()
* bindVLANtoIPv4()
* bindVLANtoIPv6()
* unbindVLANfromIPv4()
* unbindVLANfromIPv6()
* resolve8021QConflicts()
* cloneVST()
* importDPData()
* unlinkPort()
* consumePatchCable()
* replenishPatchCable()
* setPatchCableAmount()

[skip ci]

21 months agospell "natural" and "unsigned" in some more files
Denis Ovsienko [Tue, 26 Jun 2018 14:46:40 +0000 (15:46 +0100)] 
spell "natural" and "unsigned" in some more files

[skip ci]

21 months agorefine some variable scope in the plugins
Denis Ovsienko [Sat, 23 Jun 2018 21:50:10 +0000 (22:50 +0100)] 
refine some variable scope in the plugins

* renderObjectCactiGraphs(): $options does not belong here
* renderObjectMuninGraphs(): idem

[skip ci]

21 months agoupgrade.php: wrap LABEL around INPUT
Denis Ovsienko [Wed, 20 Jun 2018 09:38:51 +0000 (10:38 +0100)] 
upgrade.php: wrap LABEL around INPUT

[skip ci]

21 months agorefine two hooks API functions
Denis Ovsienko [Tue, 19 Jun 2018 21:38:27 +0000 (22:38 +0100)] 
refine two hooks API functions

* registerHook(): do not reinvent a switch block; change an exception
  class from IRAE to IAE as the argument is not a user input
* universalHookHandler(): change an exception class from IRAE to an
  internal error because that is what a malformed internal structure is

21 months agomake the object port list header row overloadable
Mahomed Hussein [Tue, 19 Jun 2018 15:20:54 +0000 (16:20 +0100)] 
make the object port list header row overloadable

* renderObject(): move the code that prints the TR with THs into a new
  hook function
* renderObjectPortHeaderRow(): the new function

21 months agoswitch assertion type to "natural" in the plugins
Denis Ovsienko [Sun, 17 Jun 2018 10:34:53 +0000 (11:34 +0100)] 
switch assertion type to "natural" in the plugins

21 months agoupdate COPYING for 2018
Denis Ovsienko [Fri, 1 Jun 2018 21:33:56 +0000 (22:33 +0100)] 
update COPYING for 2018

[skip ci]

22 months agoAdded .editorconfig for editors that support it (#223)
M. Hagen [Wed, 23 May 2018 09:34:17 +0000 (11:34 +0200)] 
Added .editorconfig for editors that support it (#223)

[skip ci]

22 months agospell "natural" and "unsigned" in $opspec_list
Denis Ovsienko [Sun, 20 May 2018 08:11:43 +0000 (09:11 +0100)] 
spell "natural" and "unsigned" in $opspec_list

[skip ci]

22 months agofixup a couple more assertion types
Denis Ovsienko [Fri, 18 May 2018 14:54:23 +0000 (15:54 +0100)] 
fixup a couple more assertion types

The protocol code is not just a string, it is an enum.

* updatePortInVS()
* removePortFromVS()

22 months agoadd the new unsigned and natural assertion types
Denis Ovsienko [Fri, 18 May 2018 14:30:22 +0000 (15:30 +0100)] 
add the new unsigned and natural assertion types

For clarity update genericAssertion() to accept new "natural" and
"unsigned" assertion types. Update the functions below to replace the
call(s) to assertUIntArg() with something else, mostly the natural number
type:

* render8021QOrderForm()
* renderObject8021QPorts()
* renderObject8021QSyncPreview()
* renderObject()
* renderPortsForObject()
* dynamic_title_decoder_throwing()
* renderDiscoveredNeighbors()
* addPortForwarding()
* delPortForwarding()
* updPortForwarding()
* editPortForObject()
* supplementAttrMap()
* clearSticker()
* deleteVS()
* updateVS()
* addPortToVS: unsigned()
* updatePortInVS: unsigned()
* removePortFromVS: unsigned()
* updateTripletConfig()
* removeTriplet()
* createTriplet()
* deleteRow()
* addOIFCompat()
* delOIFCompat()
* updateVLANDomain()
* handlePopupPortLink()
* renderPopupPortSelector()
* getTripletConfigAJAX()

22 months agofixup indentation in render8021QOrderForm()
Denis Ovsienko [Fri, 18 May 2018 14:09:22 +0000 (15:09 +0100)] 
fixup indentation in render8021QOrderForm()

22 months agosave8021QPorts(): refine an assertion type
Denis Ovsienko [Fri, 18 May 2018 14:03:12 +0000 (15:03 +0100)] 
save8021QPorts(): refine an assertion type

22 months agomake isUnsignedInteger() unary
Denis Ovsienko [Fri, 18 May 2018 13:33:59 +0000 (14:33 +0100)] 
make isUnsignedInteger() unary

This gets rid of the default value and makes the code easier to read. The
function now treats zero is a valid value and any other function that
calls it expects exactly that. Remove the explicit 2nd argument from the
following functions:

* setConfigVar()
* setUserConfigVar()
* HTMLColorFromDatabase()
* sortTokenize()
* constructIPRange()
* updVSTRule()

Add two unary functions -- assertUnsignedIntArg() and
assertNaturalNumArg() -- and reduce assertUIntArg() to a wrapper.

Update the tests.

22 months agointroduce isNaturalNumber()
Denis Ovsienko [Fri, 18 May 2018 12:57:33 +0000 (13:57 +0100)] 
introduce isNaturalNumber()

In this case a separate unary function does a better job than the second
optional argument to isUnsignedInteger(), whether implicit or explicit.
Use it in decodeVLANCK() and questionMarks(). Add some tests.

22 months agomake isInteger() unary
Denis Ovsienko [Fri, 18 May 2018 12:19:11 +0000 (13:19 +0100)] 
make isInteger() unary

The only effect is on isUnsignedInteger() and the tests.

22 months agofix a bug in sortObjectAddressesAndNames()
Denis Ovsienko [Fri, 18 May 2018 10:34:57 +0000 (11:34 +0100)] 
fix a bug in sortObjectAddressesAndNames()

Since the very first known revision the function discarded the last
test result, this sometimes made the sort order wrong in the IPv4
address selector pop-up (via the NATv4 tab). Put it right and add
a few tests.

22 months agofix sortTokenize() after commit 21c8b04
Denis Ovsienko [Fri, 18 May 2018 09:58:07 +0000 (10:58 +0100)] 
fix sortTokenize() after commit 21c8b04

Use numCompare() even when one or both items are zero, like it was done
before the change.

22 months agorefine isValidVLANID()
Denis Ovsienko [Fri, 18 May 2018 09:08:10 +0000 (10:08 +0100)] 
refine isValidVLANID()

There is no sense in testing the integer to be non-negative two times,
one time is enough.

22 months agofix a bug in updVSTRule()
Denis Ovsienko [Fri, 18 May 2018 08:56:50 +0000 (09:56 +0100)] 
fix a bug in updVSTRule()

It turns out, the VLAN switch template editor never allowed to update a
rule with the sequence number (rule_no) set to 0. The number cannot be
negative, but it can be zero, so put the range check right.

22 months agouse getBypassValue() where it belongs
Denis Ovsienko [Thu, 17 May 2018 18:09:12 +0000 (19:09 +0100)] 
use getBypassValue() where it belongs

* addIPToVS()
* updateIPInVS()
* updatePortInVS()
* removeIPFromVS()
* removePortFromVS()
* doVSMigrate()

22 months agoAdded Debian 9
TakeMeNL [Fri, 11 May 2018 12:23:49 +0000 (14:23 +0200)] 
Added Debian 9

22 months agoupdate README.md for Ubuntu 18.04
Denis Ovsienko [Wed, 16 May 2018 20:58:48 +0000 (21:58 +0100)] 
update README.md for Ubuntu 18.04

[skip ci]

22 months agogenericAssertion(): fix a few minor issues
Denis Ovsienko [Wed, 16 May 2018 18:03:20 +0000 (19:03 +0100)] 
genericAssertion(): fix a few minor issues

The function stopped validating the 'l2address' assertion type properly
since the commit 039ef80. However, it is unlikely the bug had caused any
consequences because RackTables code asserts only the 'l2address0' type.

Fix that and put respective IAE to IRAE class conversion right to deliver
the message from l2addressForDatabase() as much intact as possible
(before this change genericAssertion() replaced the message and the
mention of IPoIB was not making it to the user interface).

Fix a similar conversion issue for the 'uint-vlan' and 'uint-vlan1'
types (this removes a lot of unnecessary text from the message). Ibid,
for clarity call assertStringArg() outside of the conversion block.

22 months agoAdded T1600G-18TS to SNMP Sync (#221)
M. Hagen [Tue, 1 May 2018 08:54:27 +0000 (10:54 +0200)] 
Added T1600G-18TS to SNMP Sync (#221)

22 months agoupgrade CodeMirror from 5.33.0 to 5.37.0
Denis Ovsienko [Mon, 30 Apr 2018 14:44:00 +0000 (15:44 +0100)] 
upgrade CodeMirror from 5.33.0 to 5.37.0

[skip ci]

22 months agodictionary: add Ubuntu and MikroTik items
Denis Ovsienko [Mon, 30 Apr 2018 14:40:09 +0000 (15:40 +0100)] 
dictionary: add Ubuntu and MikroTik items

23 months agoios12PickSwitchportCommand: fix undefined key
Alexey Andriyanov [Tue, 24 Apr 2018 13:40:39 +0000 (16:40 +0300)] 
ios12PickSwitchportCommand: fix undefined key

Warnings were emitted when no switched ports found.

23 months agofixup some more issues with commit 531b1ce
Denis Ovsienko [Tue, 24 Apr 2018 11:43:23 +0000 (12:43 +0100)] 
fixup some more issues with commit 531b1ce

23 months ago- fix importPTRData
Dirk Meyer [Fri, 20 Apr 2018 14:35:12 +0000 (16:35 +0200)] 
- fix importPTRData
Uncaught ArgumentCountError: Too few arguments to function updateAddress

23 months agoUpdate interface.php for accesskey <alt>+<s> (#219)
Leroy Zwakman [Tue, 24 Apr 2018 12:26:23 +0000 (14:26 +0200)] 
Update interface.php for accesskey <alt>+<s> (#219)

Added a accesskey property to the input tag. This makes the searchbox focus when you press <alt>+<s> for easier / faster searching.

23 months agoAdding Fortinet, Raritan, HP Aruba and VMware
stumbaumr [Thu, 12 Apr 2018 12:40:11 +0000 (14:40 +0200)] 
Adding Fortinet, Raritan, HP Aruba and VMware

23 months agoVarious updates (#218)
M. Hagen [Thu, 12 Apr 2018 21:14:00 +0000 (23:14 +0200)] 
Various updates (#218)

* Added APC UPS's, NETGEAR GS108/GS105, Proxmox, T1600G-18TS

23 months agoAdd latest openSUSE Leap and SUSE Linux Enterprise distributions (#211)
Lars Vogdt [Thu, 12 Apr 2018 19:22:16 +0000 (21:22 +0200)] 
Add latest openSUSE Leap and SUSE Linux Enterprise distributions (#211)

23 months agofix whitespace and query order after 531b1ce3
Alexey Andriyanov [Tue, 3 Apr 2018 14:37:38 +0000 (17:37 +0300)] 
fix whitespace and query order after 531b1ce3

23 months agoMerge pull request #210 from ivladdalvi/shared-router
Alexey Andriyanov [Tue, 3 Apr 2018 14:29:12 +0000 (17:29 +0300)] 
Merge pull request #210 from ivladdalvi/shared-router

"shared router" allocation to support VRRP and alike

2 years agodictionary: add an Ubuntu Linux release
Denis Ovsienko [Tue, 6 Mar 2018 12:45:57 +0000 (12:45 +0000)] 
dictionary: add an Ubuntu Linux release

2 years ago"shared router" allocation to support VRRP and alike 210/head
Vladimir Ivanov [Thu, 1 Mar 2018 13:12:19 +0000 (21:12 +0800)] 
"shared router" allocation to support VRRP and alike

2 years agotests: amend for PHPUnit 7
Denis Ovsienko [Sun, 18 Feb 2018 18:16:00 +0000 (18:16 +0000)] 
tests: amend for PHPUnit 7

It turns out, Travis CI now ships PHPUnit 7.0.0 with PHP 7.2.

2 years agotests: display the unrecognized PHPUnit version
Denis Ovsienko [Sun, 18 Feb 2018 18:08:59 +0000 (18:08 +0000)] 
tests: display the unrecognized PHPUnit version

2 years agodictionary: add a MikroTik switch
Denis Ovsienko [Sun, 18 Feb 2018 17:51:01 +0000 (17:51 +0000)] 
dictionary: add a MikroTik switch

2 years agoupgrade CodeMirror from 5.31.0 to 5.33.0
Denis Ovsienko [Sat, 27 Jan 2018 23:31:03 +0000 (23:31 +0000)] 
upgrade CodeMirror from 5.31.0 to 5.33.0

[skip ci]

2 years agofixup commit a975b2d
Denis Ovsienko [Fri, 5 Jan 2018 14:48:18 +0000 (14:48 +0000)] 
fixup commit a975b2d

Rename the tab name from "server" to "serverconf" to avoid the clash
with the existing custom server report plugin.

[skip ci]

2 years agodictionary: add some new Arista switches
Denis Ovsienko [Fri, 5 Jan 2018 10:31:32 +0000 (10:31 +0000)] 
dictionary: add some new Arista switches

[skip ci]

2 years agotests: check syntax of every PHP file in tests/
Denis Ovsienko [Thu, 4 Jan 2018 15:57:38 +0000 (15:57 +0000)] 
tests: check syntax of every PHP file in tests/

2 years agotests: use RTTestCase::myString() more
Denis Ovsienko [Thu, 4 Jan 2018 15:40:34 +0000 (15:40 +0000)] 
tests: use RTTestCase::myString() more

2 years agotests: fixup commit 5ca297c
Denis Ovsienko [Thu, 4 Jan 2018 15:34:59 +0000 (15:34 +0000)] 
tests: fixup commit 5ca297c

In the Travis CI environment there are no ports in the database when it
comes to RenderReportsTest:

There was 1 failure:

1) RenderReportsTest::testHandlerPrints with data set #4 ('reports', 'ports', 'renderPortsReport')
Failed asserting that '' is not equal to <string:>.

2 years agorender8021QReport(): show VLAN name on mouse hover
Denis Ovsienko [Thu, 4 Jan 2018 13:30:12 +0000 (13:30 +0000)] 
render8021QReport(): show VLAN name on mouse hover

2 years agotests: try every report tab handler function
Denis Ovsienko [Thu, 4 Jan 2018 13:17:20 +0000 (13:17 +0000)] 
tests: try every report tab handler function

Split the test code into two methods such that if the assertion fails it
is easy to see which tabhandler function it was.

2 years agorequireExtraFiles(): rework to be useful in tests
Denis Ovsienko [Thu, 4 Jan 2018 13:06:30 +0000 (13:06 +0000)] 
requireExtraFiles(): rework to be useful in tests

Do not access globals and move the helper function out to avoid the
error on the second call.

2 years agoRTTestCase::myString(): dismiss an unused param
Denis Ovsienko [Thu, 28 Dec 2017 17:32:59 +0000 (17:32 +0000)] 
RTTestCase::myString(): dismiss an unused param

2 years agoadd a server configuration report
Denis Ovsienko [Wed, 27 Dec 2017 16:54:24 +0000 (16:54 +0000)] 
add a server configuration report

* renderServerConfigurationReport(): a new function, a wrapper around
  platform_is_ok()

2 years agocheck for InnoDB support consistently
Denis Ovsienko [Wed, 27 Dec 2017 16:41:02 +0000 (16:41 +0000)] 
check for InnoDB support consistently

The installer always makes the InnoDB support check. The upgrade code
only made it in the 0.20.7 release batch, fix it to have it made as a
part of the existing pre-upgrade check list.

* platform_is_ok(): accept an optional parameter to enable the check
* init_database_static(): make some related comments for clarity
* renderUpgraderHTML(): always request the InnoDB check

2 years agofix some spelling in comments
Denis Ovsienko [Mon, 4 Dec 2017 15:02:38 +0000 (15:02 +0000)] 
fix some spelling in comments

[skip ci]

2 years agodictionary: add more MikroTik devices
Denis Ovsienko [Mon, 4 Dec 2017 12:14:29 +0000 (12:14 +0000)] 
dictionary: add more MikroTik devices

[skip ci]

2 years agoTP-Link switches SNMP (GH#209)
M. Hagen [Mon, 4 Dec 2017 12:11:35 +0000 (13:11 +0100)] 
TP-Link switches SNMP (GH#209)

Added:
T1700G-28TQ
TL-SG2216
TL-SG3424 relates to Mantis#1591

2 years agofix a PHP 7.2 warning that broke a few tests
Denis Ovsienko [Fri, 1 Dec 2017 10:10:15 +0000 (10:10 +0000)] 
fix a PHP 7.2 warning that broke a few tests

count(): Parameter must be an array or an object that implements Countable

* usePreparedDeleteBlade(): use is_array() before count()
* usePreparedUpdateBlade(): idem

2 years agoTravis CI: also test with PHP 7.2
Denis Ovsienko [Fri, 1 Dec 2017 09:48:35 +0000 (09:48 +0000)] 
Travis CI: also test with PHP 7.2

2 years agofixup the previous commit
Denis Ovsienko [Thu, 9 Nov 2017 16:00:38 +0000 (16:00 +0000)] 
fixup the previous commit

[ckip ci]

2 years agochangelog entries
Alexey Andriyanov [Thu, 9 Nov 2017 14:41:20 +0000 (17:41 +0300)] 
changelog entries

2 years agoterminal_settings can alter tolerate_remote_errors
Alexey Andriyanov [Thu, 9 Nov 2017 14:11:04 +0000 (17:11 +0300)] 
terminal_settings can alter tolerate_remote_errors

This change extends the structure taken and returned by a the user's
hook function terminal_settings(). The new field
'tolerate_remote_errors' has been added that can override the same-named
parameter of queryTerminal().

This could be helpful when you have a custom device breed defined in a
plug-in. Such devices could provide a normal bourne shell CLI that
tracks exit codes of each command and proxies it to the ssh session.
This makes the FALSE value of tolerate_remote_errors (say, set by
setDevice8021QConfig()) useless and even harmful, because every STDERR
warning causes queryTerminal to throw an exception.

This commit allows user to override tolerate_remote_errors for such
devices in his terminal_settings().

2 years agoadded ability to set shortenIfName for breed
Aleksandr Balezin [Tue, 24 Oct 2017 15:59:20 +0000 (18:59 +0300)] 
added ability to set shortenIfName for breed

Before this patch it was not possible to change shortenIfName behavior. Now
user can add breed and specify function for it

2 years agocheck permissions for 802.1q port native vlan change
Alexey Andriyanov [Wed, 18 Oct 2017 16:58:03 +0000 (19:58 +0300)] 
check permissions for 802.1q port native vlan change

There were no permission check for port config change
from e.g. T2+3,5 to T3+2,5, but this could break some host's
connectivity, so we should check that this operation is performed by
user who owns both vlans 2 and 3.

2 years agofilter8021QChangeRequests: restrict alien vlans on uplink
Alexey Andriyanov [Mon, 10 Jul 2017 15:22:59 +0000 (18:22 +0300)] 
filter8021QChangeRequests: restrict alien vlans on uplink

2 years agodictionary: add some more NEC switches
Denis Ovsienko [Mon, 6 Nov 2017 10:55:17 +0000 (10:55 +0000)] 
dictionary: add some more NEC switches

[skip ci]

2 years agodictionary: add a new MikroTik device
Denis Ovsienko [Wed, 1 Nov 2017 11:13:28 +0000 (11:13 +0000)] 
dictionary: add a new MikroTik device

[skip ci]

2 years agoIn comments eliminate commas before "than".
Denis Ovsienko [Fri, 27 Oct 2017 11:23:36 +0000 (12:23 +0100)] 
In comments eliminate commas before "than".

[ckip ci]

2 years agomake two keys in MountOperation unique
Denis Ovsienko [Fri, 27 Oct 2017 09:04:55 +0000 (10:04 +0100)] 
make two keys in MountOperation unique

2 years agostart an upgrade section for 0.21.2
Denis Ovsienko [Fri, 27 Oct 2017 08:54:06 +0000 (09:54 +0100)] 
start an upgrade section for 0.21.2

2 years agolist the implicit keys in MountOperation
Denis Ovsienko [Fri, 27 Oct 2017 08:51:45 +0000 (09:51 +0100)] 
list the implicit keys in MountOperation

2 years agotests: add data/0.21.0.sql and data/0.21.1.sql
Denis Ovsienko [Thu, 26 Oct 2017 16:06:08 +0000 (17:06 +0100)] 
tests: add data/0.21.0.sql and data/0.21.1.sql

[skip ci]

2 years agoconstructIPRange(): use isUnsignedInteger()
Denis Ovsienko [Thu, 26 Oct 2017 14:49:04 +0000 (15:49 +0100)] 
constructIPRange(): use isUnsignedInteger()

2 years agotests: cover constructIPRange()
Denis Ovsienko [Thu, 26 Oct 2017 14:48:17 +0000 (15:48 +0100)] 
tests: cover constructIPRange()

2 years agoupgrade CodeMirror from 5.29.0 to 5.31.0
Denis Ovsienko [Mon, 23 Oct 2017 10:57:10 +0000 (11:57 +0100)] 
upgrade CodeMirror from 5.29.0 to 5.31.0

[skip ci]

2 years ago0.21.1: cut the release RackTables-0.21.1
Denis Ovsienko [Sun, 22 Oct 2017 10:28:53 +0000 (11:28 +0100)] 
0.21.1: cut the release

2 years agodictionary: add HPE blade enclosures (Mantis#1795)
Denis Ovsienko [Sun, 22 Oct 2017 09:46:28 +0000 (10:46 +0100)] 
dictionary: add HPE blade enclosures (Mantis#1795)

[skip ci]

2 years agomake a couple small fixes (Mantis#1797)
Alberto Avai [Fri, 13 Oct 2017 08:55:44 +0000 (09:55 +0100)] 
make a couple small fixes (Mantis#1797)

[skip ci]

2 years agoeval_expression(): remove a no-op break
Denis Ovsienko [Thu, 12 Oct 2017 10:02:10 +0000 (11:02 +0100)] 
eval_expression(): remove a no-op break

2 years agoconsiderConfiguredConstraint(): fix exceptions
Denis Ovsienko [Thu, 12 Oct 2017 10:00:24 +0000 (11:00 +0100)] 
considerConfiguredConstraint(): fix exceptions

When the recent renaming of VLANIPV4NET_LISTSRC to VLANNET_LISTSRC failed
to happen, considerConfiguredConstraint() then failed to fail properly as
it was incorrectly masking the exception thrown in getConfigVar(), which
was trying to signal that the variable does not exist. Put it right.

2 years agoput renaming of VLANIPV4NET_LISTSRC right
Denis Ovsienko [Thu, 12 Oct 2017 08:22:48 +0000 (09:22 +0100)] 
put renaming of VLANIPV4NET_LISTSRC right

2 years agoimprove Percona server support (Mantis#1793)
Denis Ovsienko [Mon, 9 Oct 2017 16:19:14 +0000 (17:19 +0100)] 
improve Percona server support (Mantis#1793)

According to the bug report, Atom and ObjectHistory were the only tables
that did not have a unique/primary key. Add an auto_increment primary
key column to ObjectHistory and a unique key to Atom. In the latter case
this converts all columns to NOT NULL and makes the values mandatory due
to the strict SQL mode.

2 years agolist the auto-created keys in Atom table
Denis Ovsienko [Mon, 9 Oct 2017 15:17:42 +0000 (16:17 +0100)] 
list the auto-created keys in Atom table

2 years agoamend description for VLANNET_LISTSRC
Denis Ovsienko [Mon, 9 Oct 2017 10:13:59 +0000 (11:13 +0100)] 
amend description for VLANNET_LISTSRC

2 years agotests: cover datetimeFormatHint()
Denis Ovsienko [Thu, 5 Oct 2017 15:46:06 +0000 (16:46 +0100)] 
tests: cover datetimeFormatHint()

2 years agosimplify PHPUnit bootstrap and props
Denis Ovsienko [Wed, 4 Oct 2017 11:05:29 +0000 (12:05 +0100)] 
simplify PHPUnit bootstrap and props

Merge TestHelper.php into bootstrap_common.php. In bootstrap_v4v5.php and
bootstrap_v6.php leave only a shim class declaration before requiring
bootstrap_common.php.

2 years agorefine VLAN checks in genericAssertion()
Denis Ovsienko [Wed, 4 Oct 2017 11:04:13 +0000 (12:04 +0100)] 
refine VLAN checks in genericAssertion()

Replace some local code with a call to decodeVLANCK(), make the
VLAN_DFL_ID check the last.

2 years agorefine and test decodeVLANCK()
Denis Ovsienko [Mon, 2 Oct 2017 16:16:15 +0000 (17:16 +0100)] 
refine and test decodeVLANCK()

Check that both domain ID and VLAN ID are within respective ranges, add
a specific message to each exception.

2 years agoisValidVLANID(): new function with tests
Denis Ovsienko [Mon, 2 Oct 2017 14:32:05 +0000 (15:32 +0100)] 
isValidVLANID(): new function with tests

Update genericAssertion() to use it.

2 years ago0.21.0: cut the release RackTables-0.21.0
Denis Ovsienko [Sun, 1 Oct 2017 21:02:28 +0000 (22:02 +0100)] 
0.21.0: cut the release

2 years agofixup the plugins wiki page URL
Denis Ovsienko [Sun, 1 Oct 2017 21:01:38 +0000 (22:01 +0100)] 
fixup the plugins wiki page URL

2 years agofix a typo in README.md
Denis Ovsienko [Sun, 1 Oct 2017 21:00:02 +0000 (22:00 +0100)] 
fix a typo in README.md

2 years agotests: cover getOutputOf()
Denis Ovsienko [Mon, 25 Sep 2017 16:01:14 +0000 (17:01 +0100)] 
tests: cover getOutputOf()

2 years agoRevert "display MySQL warnings in debug mode"
Denis Ovsienko [Mon, 25 Sep 2017 13:59:27 +0000 (14:59 +0100)] 
Revert "display MySQL warnings in debug mode"

This reverts the changes made in commit 1acbe86 because since commit
6b56ac6 the SQL mode is always strict hence the warnings never occur.

2 years agorefine use of which/that in comments
Denis Ovsienko [Mon, 25 Sep 2017 10:23:07 +0000 (11:23 +0100)] 
refine use of which/that in comments