Alexey Andriyanov [Tue, 29 Mar 2016 15:10:43 +0000 (18:10 +0300)]
Merge branch 'maintenance-0.20.x' into yandex-prod
Alexey Andriyanov [Tue, 29 Mar 2016 14:39:34 +0000 (17:39 +0300)]
Revert "refine a few assertions to test for 'inet4'"
This reverts commit
27ed1188b2c7a0685215c9df3638abd9155200ae.
Those functions are IPv6-aware.
Alexey Andriyanov [Tue, 29 Mar 2016 14:39:34 +0000 (17:39 +0300)]
Revert "refine a few assertions to test for 'inet4'"
This reverts commit
27ed1188b2c7a0685215c9df3638abd9155200ae.
Those functions are IPv6-aware.
Denis Ovsienko [Tue, 29 Mar 2016 11:40:02 +0000 (12:40 +0100)]
empty() isn't always the best tool, pt. 2
Use count() to clarify the argument is an array.
* renderVLANInfo()
* formatVLANPackDiff()
* renderIPForObject()
Denis Ovsienko [Tue, 29 Mar 2016 11:30:02 +0000 (12:30 +0100)]
renderEditVlan(): simplify some code
Denis Ovsienko [Tue, 29 Mar 2016 11:08:09 +0000 (12:08 +0100)]
init_database_static(): remove a useless test
Since get_pseudo_file() was switched to return an array instead of plain
text there should normally be no empty elements in the array. But if
there is a bug, don't hide it and just let PDO fail the normal way.
Denis Ovsienko [Mon, 28 Mar 2016 14:46:54 +0000 (15:46 +0100)]
empty() isn't always the best tool, pt. 1
To test for an empty string it does not require a function.
* updateIPNameAJAX()
* commitAddPort()
* commitUpdatePort()
* getConfiguredQuickLinks()
* formatPortLink()
Denis Ovsienko [Sun, 27 Mar 2016 19:21:06 +0000 (20:21 +0100)]
updateAddress(): simplify a boolean expression
Denis Ovsienko [Sat, 26 Mar 2016 18:19:59 +0000 (18:19 +0000)]
tests: cover matchVLANFilter() and filterVLANList()
Denis Ovsienko [Fri, 25 Mar 2016 19:12:59 +0000 (19:12 +0000)]
tests: cover goodModeForVSTRole()
Denis Ovsienko [Thu, 24 Mar 2016 09:19:50 +0000 (09:19 +0000)]
simplify trigger_8021q_configured()
Denis Ovsienko [Wed, 23 Mar 2016 21:56:32 +0000 (21:56 +0000)]
use "&&" and "||" instead of "and" and "or"
This change prevents unexpected side effects, that, for instance, used
to require two workarounds in iptree_markup_collapsion() and one in
transformRequestData(). The root cause of the problem is that "and" and
"or" are standalone operators: though their associativity is the same as
that of "&&" and "||", the order of precedence is not just different but
is lower than that of "=". The code style article now explains this.
* syncdomain.php
* getNetUsageAJAX()
* authenticate()
* permitted()
* gotClearanceForTagChain()
* authenticated_via_ldap()
* queryLDAPServer()
* RackCodeParser::accept()
* RackCodeParser::un_expr()
* checkAutotagName()
* findCtxModWarnings()
* listCells()
* fillNetKids()
* amplifyCell()
* commitLinkEntities()
* commitUpdateEntityLink()
* updateAddress()
* generateEntityAutoTags()
* createIPv4Prefix()
* newPortForwarding()
* getDomainVLANs()
* getDomainVLANList()
* upd8021QPort()
* setConfigVar()
* setUserConfigVar()
* xos12ReadLLDPStatus()
* xos12ReadInterfaceStatus()
* vrpReadLLDPStatus()
* ftos8ReadLLDPStatus()
* eos4ReadLLDPStatus()
* ros11ReadLLDPStatus()
* jun10TranslatePushQueue()
* jun10Read8021QConfig()
* ftos8ReadInterfaceStatus()
* eos4ReadInterfaceStatus()
* ucsReadInventory()
* isInnoDBSupported()
* platform_is_ok()
* stringTrace()
* assertUIntArg()
* assertStringArg()
* assertBoolArg()
* genericAssertion()
* rectHeight()
* highlightObject()
* ip4_mask()
* ip6_mask()
* l2addressForDatabase()
* sortTokenize()
* pokeNode()
* peekNode()
* addTraceToNodes()
* redirectIfNecessary()
* getObjectiveTagTree()
* getCellFilter()
* IPNetworkCmp()
* iptree_fill()
* ip_next()
* ip_prev()
* treeApplyFunc()
* getTerminalNetworks()
* iptree_markup_collapsion()
* getPortListPrefs()
* getUnlinkedPortTypeOptions()
* groupIntsToRanges()
* array_values_same()
* buildVLANFilter()
* matchVLANFilter()
* generate8021QDeployOps()
* filter8021QChangeRequests()
* getEmployedVlans()
* get8021QSyncOptions()
* exec8021QDeploy()
* saveDownlinksReverb()
* initiateUplinksReverb()
* recalc8021QPorts()
* authorize8021QChangeRequests()
* compareDecomposedPortNames()
* searchEntitiesByText()
* buildSearchRedirectURL()
* setMessage()
* isEthernetPort()
* getConfigVar()
* getObjectTypeChangeOptions()
* apply8021qChangeRequest()
* fillIPNetsCorrelation()
* fillIPSpareListBstr()
* isIPNetworkEmpty()
* listConstraint()
* checkTypeAndAttribute()
* init.php
* install.php
* not_already_installed()
* init_config()
* get_process_owner()
* check_config_access()
* init_database_dynamic()
* render8021QOrderForm()
* renderVLANDomainListEditor()
* renderVLANDomainVLANList()
* renderObject8021QPorts()
* getAccessPortControlCode()
* renderTrunkPortControls()
* renderVLANInfo()
* renderObject8021QSync()
* renderObject8021QSyncPreview()
* renderConfigMainpage()
* renderTagRowForEditor()
* printNiftySelect()
* transformRequestData()
* getRenderedIPv4NetCapacity()
* serializeTags()
* printTagTRs()
* renderEntitySummary()
* niftyString()
* showLogoutURL()
* renderRackspace()
* renderRow()
* printObjectDetailsForRenderRack()
* renderEditRackForm()
* renderObject()
* showMessageOrError()
* renderRackSpaceForObject()
* renderIPSpaceRecords()
* renderIPSpace()
* renderIPNetwork()
* renderIPAddress()
* renderIPAddressProperties()
* renderNATv4ForObject()
* renderLocationPage()
* renderEditLocationForm()
* renderLivePTR()
* buildTagCheckboxRows()
* renderCellFilterPortlet()
* renderFile()
* renderFilesPortlet()
* printIPNetInfoTDs()
* renderCell()
* getFilePreviewCode()
* renderDiscoveredNeighbors()
* switchportInfoJS()
* addIPAllocation()
* processGridForm()
* updateObjectAttributes()
* addLotOfObjects()
* save8021QPorts()
* updVSTRule()
* importDPData()
* cleanupUCS()
* getOpspec()
* buildOpspecColumns()
* findSparePorts()
* handlePopupPortLink()
* detectDeviceBreed()
* prepareRealServersTable()
* SLBTriplet::getTriplets()
* MacroParser::addMacro()
* addRStoRSPool()
* commitUpdateRS()
* doSwitchSNMPmining()
* createTrueColorOrThrow()
* renderProgressBar4Image()
* renderImagePreview()
* proxyStaticURI()
* trigger_liveports()
* trigger_object_8021qorder()
* trigger_8021q_configured()
* trigger_anyDP()
* triggerCactiGraphs()
* triggerMuninGraphs()
* getDBUpgradePath()
* renderUpgraderHTML()
* index.php
Denis Ovsienko [Tue, 22 Mar 2016 23:28:17 +0000 (23:28 +0000)]
refine getDomainVLANs()
Assign $self at top and dismiss a variable.
Denis Ovsienko [Mon, 21 Mar 2016 19:57:57 +0000 (19:57 +0000)]
renderProgressBarImage(): use array_fetch()
Denis Ovsienko [Sun, 20 Mar 2016 14:00:52 +0000 (14:00 +0000)]
prepareNavigation(): use array_fetch()
Denis Ovsienko [Sat, 19 Mar 2016 19:58:25 +0000 (19:58 +0000)]
saveScript(): refine error handling
See also commit
0a4f411.
Denis Ovsienko [Fri, 18 Mar 2016 18:17:32 +0000 (18:17 +0000)]
tests: cover validTagName()
Denis Ovsienko [Fri, 18 Mar 2016 17:46:24 +0000 (17:46 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 18
* dispatchImageRequest()
Denis Ovsienko [Fri, 18 Mar 2016 17:33:49 +0000 (17:33 +0000)]
splitNetworkByMask(): fixup formatting
Denis Ovsienko [Fri, 18 Mar 2016 10:03:11 +0000 (10:03 +0000)]
test for empty strings w/o strlen(), pt. 8
* authenticate()
* permitted()
* queryLDAPServer()
* index.php
Alexey Andriyanov [Thu, 17 Mar 2016 15:45:56 +0000 (18:45 +0300)]
detectDeviceBreed: better detection of 'jun10'
Denis Ovsienko [Thu, 17 Mar 2016 13:54:27 +0000 (13:54 +0000)]
tests: add express.sh and use it in Travis CI
The script provides a convenient way of running the same set of tests
both in Travis CI and in a working copy. Add per-file tests using the
PHP interpreter.
Denis Ovsienko [Thu, 17 Mar 2016 11:58:30 +0000 (11:58 +0000)]
refine getLocationTrail()
Use implode() and call listCells() only when the static array is empty.
Denis Ovsienko [Thu, 17 Mar 2016 10:15:07 +0000 (10:15 +0000)]
loadUserConfigCache(): refine error handling
Don't specify a default value as in this case missing argument is an
error and there is no gain in suppressing the PHP warning. Explain the
exception.
Denis Ovsienko [Thu, 17 Mar 2016 10:08:51 +0000 (10:08 +0000)]
test for empty strings w/o strlen(), pt. 7
* loadUserConfigCache()
* getRenderedAlloc()
* renderEditRowForm()
* printObjectDetailsForRenderRack()
* renderEditObjectForm()
* renderEditRackForm()
* renderRackInfoPortlet()
* renderObject()
* renderPortsForObject()
* renderIPNetwork()
* renderIPAddress()
* renderIPAddressProperties()
* renderNATv4ForObject()
* renderEditLocationForm()
* renderLivePTR()
* buildTagCheckboxRows()
* renderCellFilterPortlet()
* renderFileSummary()
* printIPNetInfoTDs()
* renderCell()
* renderRouterCell()
* showTabs()
* dynamic_title_decoder_throwing()
* renderDiscoveredNeighbors()
* formatIfTypeVariants()
* formatPortReservation()
Alexey Andriyanov [Thu, 17 Mar 2016 09:27:34 +0000 (12:27 +0300)]
Changelog line for 2ca58c
Alexey Andriyanov [Thu, 17 Mar 2016 09:22:53 +0000 (12:22 +0300)]
Merge pull request #148 from dmage/maintenance-0.20.x
Use Cmd+Click to inverse tag selection on OS X
Denis Ovsienko [Wed, 16 Mar 2016 22:23:39 +0000 (22:23 +0000)]
Travis CI: also test syncdomain.php
Denis Ovsienko [Wed, 16 Mar 2016 22:15:27 +0000 (22:15 +0000)]
syncdomain.php: make --help a valid option
This way it exits with the return code 0.
Oleg Bulatov [Wed, 16 Mar 2016 17:45:03 +0000 (20:45 +0300)]
Use Cmd+Click to inverse tag selection on OS X
Signed-off-by: Oleg Bulatov <dmage@yandex-team.ru>
Alexey Andriyanov [Wed, 16 Mar 2016 14:38:09 +0000 (17:38 +0300)]
Nexus 7700 models added into dictionary
Denis Ovsienko [Wed, 16 Mar 2016 09:55:55 +0000 (09:55 +0000)]
test for empty strings w/o strlen(), pt. 6
* renderObject8021QPorts()
* renderVLANInfo()
* renderObject8021QSyncPreview()
* getImageHREF()
* serializeTags()
* niftyString()
* makeIPAllocLink()
* queryTerminal()
* callScript()
* getUpgradeBatch()
* getDatabaseVersion()
* showUpgradeError()
* renderUpgraderHTML()
Denis Ovsienko [Tue, 15 Mar 2016 16:14:10 +0000 (16:14 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 17
* addRow()
* updateRack()
* addObjectlog()
Denis Ovsienko [Tue, 15 Mar 2016 12:31:34 +0000 (12:31 +0000)]
refine more SQL queries
Request specific columns like in commit
af13d78.
* SLBTriplet::getTriplets()
* addSLBPortLink()
* addSLBIPLink()
Denis Ovsienko [Tue, 15 Mar 2016 10:32:18 +0000 (10:32 +0000)]
tests: cover ip_get_arpa()
Denis Ovsienko [Tue, 15 Mar 2016 07:55:00 +0000 (07:55 +0000)]
test for empty strings w/o strlen(), pt. 5
* MacroParser::expand()
* addRStoRSPool()
* commitUpdateRS()
* commitUpdateVS()
* concatConfig()
Denis Ovsienko [Mon, 14 Mar 2016 17:22:35 +0000 (17:22 +0000)]
ros11TranslatePushQueue(): fix Marvell ROS as well
That had been copied from the JunOS code (where it applies) too.
Alexey Andriyanov [Mon, 14 Mar 2016 16:21:49 +0000 (19:21 +0300)]
eos4TranslatePushQueue: vlan removing from Arista
A vlan was removed from switch only if it was named. Despite the name
check, it was still removed using the VID, so this check seems
completely useless. Removed it.
Denis Ovsienko [Mon, 14 Mar 2016 10:58:23 +0000 (10:58 +0000)]
rectify makeWhereSQL()
Use implode(), validate input arguments and don't prepend the result
with two extra spaces. Update the tests.
Denis Ovsienko [Mon, 14 Mar 2016 10:26:53 +0000 (10:26 +0000)]
tests: cover makeWhereSQL()
Denis Ovsienko [Sun, 13 Mar 2016 18:27:10 +0000 (18:27 +0000)]
test for empty strings w/o strlen(), pt. 4
* formatLoggedSpan()
* ios12PickSwitchportCommand()
* fdry5PickInterfaceSubcommand()
Denis Ovsienko [Sun, 13 Mar 2016 14:35:43 +0000 (14:35 +0000)]
tests: cover 3 script functions
* saveScript()
* loadScript()
* deleteScript()
Denis Ovsienko [Sat, 12 Mar 2016 20:19:48 +0000 (20:19 +0000)]
test for empty strings w/o strlen(), pt. 3
* assertStringArg()
* assertBoolArg()
* findAllEndpoints()
* extractLayout()
* redirectIfNecessary()
* getCellFilter()
* treeApplyFunc()
* considerGivenConstraint()
* scanRealmByText()
* serializeVLANPack()
* getRackCode()
* guessTableStructure()
* universalOpHandler()
* listConstraint()
* formatEntityName()
* getMgmtProtosConfig()
Denis Ovsienko [Fri, 11 Mar 2016 14:16:28 +0000 (14:16 +0000)]
fixup a few more plurals
* showMessageOrError()
Denis Ovsienko [Fri, 11 Mar 2016 14:11:56 +0000 (14:11 +0000)]
addMultiPorts(): fix a PHP warning
PHP Warning: Missing argument 7 for commitUpdatePort(), called in
/usr/local/racktables/wwwroot/inc/ophandlers.php on line 935
Denis Ovsienko [Fri, 11 Mar 2016 13:31:49 +0000 (13:31 +0000)]
use mkCellA() even more
This is another follow-up to commit
6d8424f.
* renderDiscoveredNeighbors()
* addMultipleObjects()
Denis Ovsienko [Fri, 11 Mar 2016 11:07:05 +0000 (11:07 +0000)]
rectify adding of new objects
Update renderAddMultipleObjectsForm() supply and extra form parameter as
MASSCOUNT may be different when the form is generated and when it is
processed. Update addMultipleObjects() to use that and dismiss some
unnecessary code.
Denis Ovsienko [Fri, 11 Mar 2016 10:23:38 +0000 (10:23 +0000)]
test for empty strings w/o strlen(), pt. 2
* addPortForwarding()
* addMultiPorts()
* addIPAllocation()
* updateUser()
* addLotOfObjects()
* addRealServers()
* renderVS()
* getPopupSLBConfig()
* updateStickerForCell()
* doSwitchSNMPmining()
* doPDUSNMPmining()
Denis Ovsienko [Thu, 10 Mar 2016 18:34:24 +0000 (18:34 +0000)]
addMultiPorts(): handle invalid input better
When some of the lines in the multi-line input have format errors,
instead of stopping the processing and displaying an exception page
just show a standard one-line message for each such line.
Denis Ovsienko [Thu, 10 Mar 2016 16:22:35 +0000 (16:22 +0000)]
tests: cover serializeVLANPack()
Denis Ovsienko [Thu, 10 Mar 2016 11:10:12 +0000 (11:10 +0000)]
tests: update README and convert to Markdown
Denis Ovsienko [Thu, 10 Mar 2016 10:52:22 +0000 (10:52 +0000)]
test for empty strings w/o strlen(), pt. 1
* commitUpdateObject()
* getRackspaceStats()
* generateEntityAutoTags()
* saveScript()
* deleteScript()
* init.php
* renderSLBEntityCell()
* renderRSPool()
* renderRealServerList()
* renderVirtualService()
Denis Ovsienko [Wed, 9 Mar 2016 15:21:53 +0000 (15:21 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 16
* getPortInfoAJAX()
* index.php
Denis Ovsienko [Tue, 8 Mar 2016 09:51:06 +0000 (09:51 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 15
* updateIPNameAJAX()
* updateIPCommentAJAX()
* updateCableIdAJAX()
Denis Ovsienko [Mon, 7 Mar 2016 18:50:27 +0000 (18:50 +0000)]
tests: cover mergeTagChains()
Denis Ovsienko [Mon, 7 Mar 2016 17:50:23 +0000 (17:50 +0000)]
printNiftySelect(): dismiss an unused parameter
Denis Ovsienko [Mon, 7 Mar 2016 17:18:08 +0000 (17:18 +0000)]
importDPData(): amend exception class
The data in this case comes from the HTTP request hence use IRAE to
signal malformed input.
Denis Ovsienko [Mon, 7 Mar 2016 17:16:37 +0000 (17:16 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 14
* updatePortRsvAJAX()
* importDPData()
* buildOpspecColumns()
Denis Ovsienko [Sun, 6 Mar 2016 20:51:32 +0000 (20:51 +0000)]
nextMACAddress(): add input validation
Use a PCRE of its own as RE_L2_IFCFG matches a wider class of strings.
Add more tests.
Denis Ovsienko [Sat, 5 Mar 2016 21:51:12 +0000 (21:51 +0000)]
move processGridForm() to where it belongs
Denis Ovsienko [Sat, 5 Mar 2016 21:18:46 +0000 (21:18 +0000)]
tests: cover nextMACAddress()
Denis Ovsienko [Fri, 4 Mar 2016 17:05:46 +0000 (17:05 +0000)]
tests: cover l2addressForDatabase()
Denis Ovsienko [Fri, 4 Mar 2016 16:33:09 +0000 (16:33 +0000)]
tests: cover ip4_mask() and ip6_mask()
Denis Ovsienko [Fri, 4 Mar 2016 16:27:05 +0000 (16:27 +0000)]
tests: one more for HTTPDateToUnixTime()
Denis Ovsienko [Fri, 4 Mar 2016 10:00:26 +0000 (10:00 +0000)]
punctuation
Denis Ovsienko [Fri, 4 Mar 2016 08:08:56 +0000 (08:08 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 13
* resolve8021QConflicts()
Denis Ovsienko [Thu, 3 Mar 2016 10:42:51 +0000 (10:42 +0000)]
suppress more unnecessary arguments
Denis Ovsienko [Thu, 3 Mar 2016 10:13:32 +0000 (10:13 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 12
* querySNMPData()
* addOIFCompatPack()
* delOIFCompatPack()
* del8021QOrder()
* unlinkPort()
* clearVlan()
* deleteVlan()
Denis Ovsienko [Thu, 3 Mar 2016 09:25:27 +0000 (09:25 +0000)]
fixup a few plurals
* renderVLANDomainVLANList()
* renderEditVlan()
* renderPortsForObject()
* clearVlan()
* deleteVlan()
* renameObjectPorts()
* renderEditRSPool()
* renderEditVService()
* renderEditVS()
Denis Ovsienko [Thu, 3 Mar 2016 09:05:14 +0000 (09:05 +0000)]
add a missing licensing header
Denis Ovsienko [Wed, 2 Mar 2016 21:54:33 +0000 (21:54 +0000)]
factor interface-8021q.php out
Move interface functions below to a feature-specific file:
* render8021QOrderForm()
* render8021QStatus()
* renderVLANDomainListEditor()
* renderVLANDomain()
* renderVLANDomainVLANList()
* get8021QPortTrClass()
* renderObject8021QPorts()
* getAccessPortControlCode()
* getTrunkPortCursorCode()
* renderTrunkPortControls()
* renderVLANInfo()
* renderVLANIPLinks()
* renderObject8021QSync()
* renderObject8021QSyncSchedule()
* renderObject8021QSyncPreview()
* renderObject8021QSyncPorts()
* renderVSTListEditor()
* renderVSTRules()
* renderVST()
* renderVSTRulesEditor()
* renderDeployQueue()
* formatVLANPackDiff()
* renderEditVlan()
Denis Ovsienko [Wed, 2 Mar 2016 12:56:30 +0000 (12:56 +0000)]
refine a couple SQL queries
Use proper capitalization and request specific columns.
* fetchIPv4AddressNetworkRow()
* fetchIPv6AddressNetworkRow()
Denis Ovsienko [Wed, 2 Mar 2016 08:13:12 +0000 (08:13 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 11
* addLocation()
* deleteRack()
* cleanRack()
* cloneRSPool()
Denis Ovsienko [Tue, 1 Mar 2016 22:48:22 +0000 (22:48 +0000)]
renderEditRSPool(): suppress unnecessary arguments
No need to repeat what getOpLink() already does anyway.
Denis Ovsienko [Tue, 1 Mar 2016 08:11:21 +0000 (08:11 +0000)]
clarify the search query error message
Don't throw an exception in searchHandler() as this function is not an
ophandler and there's no special handling for it besides the last-resort
exception trap, which prints only a minimalistic page. Instead handle
the situation locally and present the user with a standard message bar
on the main page.
Denis Ovsienko [Mon, 29 Feb 2016 10:11:44 +0000 (10:11 +0000)]
refine exception class in newPortForwarding()
Throw InvalidArgException and modify addPortForwarding() to convert to
InvalidRequestArgException.
Denis Ovsienko [Sun, 28 Feb 2016 15:06:43 +0000 (15:06 +0000)]
simplify addLotOfObjects() further
Omit unnecessary "else" after "return" and unnecessary "continue" at the
cycle end, use mkCellA(), reword an error message.
Denis Ovsienko [Sun, 28 Feb 2016 14:37:09 +0000 (14:37 +0000)]
factor TEXTAREA input filtering out
Replace some of the earliest bits of code with a much cleaner function.
Add some tests.
* textareaCooked(): new function
* addMultiPorts(): update
* addLotOfObjects(): update
* addRack(): update
Denis Ovsienko [Sat, 27 Feb 2016 15:38:40 +0000 (15:38 +0000)]
tests: cover iosParseVLANString()
Denis Ovsienko [Sat, 27 Feb 2016 15:20:13 +0000 (15:20 +0000)]
tests: cover listToRanges()
Denis Ovsienko [Sat, 27 Feb 2016 14:53:42 +0000 (14:53 +0000)]
tests: cover buildVLANFilter()
Denis Ovsienko [Sat, 27 Feb 2016 10:26:08 +0000 (10:26 +0000)]
update a comment for buildVLANFilter()
Denis Ovsienko [Sat, 27 Feb 2016 09:29:21 +0000 (09:29 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 10
* save8021QPorts()
Denis Ovsienko [Fri, 26 Feb 2016 20:52:00 +0000 (20:52 +0000)]
rectify the code for rack adding
* renderNewRackForm(): update to signal the request origin with just one
argument and make it mandatory
* addRack(): reflect the change above, decrease direct use of $_REQUEST,
clean TEXTAREA processing up, use mkCellA() in status messages
Denis Ovsienko [Thu, 25 Feb 2016 21:23:30 +0000 (21:23 +0000)]
add a Travis CI configuration file
Denis Ovsienko [Thu, 25 Feb 2016 12:00:52 +0000 (12:00 +0000)]
add type guards to array_values_same()
Unless both arguments to array_diff() are arrays, the function returns
an empty array as if the arguments were arrays and the first one was a
subset of the second. In this case (though there would be a PHP
warning) array_values_same() would return TRUE to indicate no
differences between the arguments.
Add a few tests.
Denis Ovsienko [Thu, 25 Feb 2016 10:59:19 +0000 (10:59 +0000)]
tests: make the IAE test n-ary
This avoids the hassle of maintaining a separate test/provider method
pair for every value of n.
Denis Ovsienko [Thu, 25 Feb 2016 08:01:58 +0000 (08:01 +0000)]
refine a few assertions to test for 'inet4'
In the functions below the assertions would be satisfied with an either
IPv4 or IPv6 address whereas those functions are strictly IPv4-specific.
Nail it down to IPv4.
* addRealServer()
* addVService()
* updateRealServer()
* updateVService()
Denis Ovsienko [Wed, 24 Feb 2016 20:17:07 +0000 (20:17 +0000)]
renderRackspaceRowEditor(): add a missing TD
Denis Ovsienko [Wed, 24 Feb 2016 10:29:22 +0000 (10:29 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 9
* updateObjectAllocation()
* save8021QPorts()
Denis Ovsienko [Wed, 24 Feb 2016 09:46:35 +0000 (09:46 +0000)]
rectify acceptable8021QConfig()
Fix the 'trunk' case to actually look into 'native' and 'allowed'. This
provides better error detection for manual 802.1Q synchronization. Add
some tests.
Denis Ovsienko [Wed, 24 Feb 2016 08:15:42 +0000 (08:15 +0000)]
update a few functions to use isCheckSet()
* processGridForm()
* mergeGridFormToRack()
* updateLocation()
Denis Ovsienko [Tue, 23 Feb 2016 22:47:22 +0000 (22:47 +0000)]
renderEditLocationForm(): add a LABEL
Alexey Andriyanov [Tue, 23 Feb 2016 20:40:09 +0000 (23:40 +0300)]
Changelog line for commit
d3dd017a
Boris Lytochkin [Tue, 23 Feb 2016 20:31:42 +0000 (23:31 +0300)]
fix LLDP info for Cisco IOS in cases when remote name is too long:
separate known interface names from remote names
Denis Ovsienko [Tue, 23 Feb 2016 17:57:42 +0000 (17:57 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 7
* addPortForObject()
* addRack()
Denis Ovsienko [Mon, 22 Feb 2016 22:08:37 +0000 (22:08 +0000)]
fix a PHP warning after commit
19f4c98
"Missing argument 3 for array_fetch()..."
* setConfigVar()
* setUserConfigVar()
* resetUserConfigVar()
Denis Ovsienko [Mon, 22 Feb 2016 10:32:31 +0000 (10:32 +0000)]
decrease direct use of $_REQUEST and $sic, pt. 6
* addPortForwarding()
* delPortForwarding()
* updPortForwarding()
Denis Ovsienko [Mon, 22 Feb 2016 10:16:03 +0000 (10:16 +0000)]
factor NATv4 protocol options out
$natv4_proto: a global list of NATv4 protocol options
renderNATv4ForObject(): feed the new list into printSelect()
genericAssertion(): add a new 'enum/natv4proto' assertion type
Denis Ovsienko [Mon, 22 Feb 2016 10:03:01 +0000 (10:03 +0000)]
newPortForwarding(): clarify error messages
Was: "Argument 'remoteip_bin' of value is invalid (Non-existent ip)."
Now: "Argument 'remoteip_bin' of value '192.168.0.1' is invalid (address
does not belong to a known network)."