firstOrDefault() was replaced with first(null)

After the FormatVersion of core library was updated
there is no mo legacy firstOrDefault() method.
Instead native yaql first(null) must be used

Change-Id: I016d6932ee45e2eeee2147da6370be7f7b585267
This commit is contained in:
Stan Lagun 2016-08-26 08:25:17 -07:00
parent 4cdddef59a
commit 1f3b1be24e
2 changed files with 3 additions and 4 deletions

View File

@ -81,8 +81,7 @@ Workflow:
$.device_id in $routerCandidates and $.network_id != $this._internalNetworkId).
select($.network_id)
- $externalNetwork: $._getNetworks().where(
$.get('router:external') = true and $.id in $networkCandidates).
firstOrDefault()
$.get('router:external') = true and $.id in $networkCandidates).first(null)
- If: $externalNetwork != null
Then:
- $.externalNetworkName: $externalNetwork.name
@ -91,7 +90,7 @@ Workflow:
- If: $.externalNetworkName = null
Then:
$.externalNetworkName: $._getNetworks().where(
$.get('router:external') = true).select($.name).firstOrDefault()
$.get('router:external') = true).select($.name).first(null)
- If: $._externalNetworkId = null and $.externalNetworkName != null
Then:
$._externalNetworkId: $._getNetworks().where(

View File

@ -202,7 +202,7 @@ Methods:
Else:
- If: $.networks.customNetworks!= null
Then:
- $._primaryNetwork: $.networks.customNetworks.firstOrDefault()
- $._primaryNetwork: $.networks.customNetworks.first(null)
ensureNetworksDeployed:
Body: