Skip to content

Commit 699c4fd

Browse files
committed
Merge branch 'release-v6'
2 parents bcaab7c + d50e45b commit 699c4fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1021
-820
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,4 @@ tools/docker/containers/mysql/docker.sql
7676

7777
tests/Browser/ExampleTest.php
7878
app/Console/Commands/Redcentric.php
79+
.env.sage

.idea/IXP-Manager.iml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

+19-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.phpstorm.meta.php/laravel.meta.php

+4
Original file line numberDiff line numberDiff line change
@@ -2618,6 +2618,10 @@
26182618
]));
26192619

26202620

2621+
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::mock(0), map(["" => "@&\Mockery\MockInterface"]));
2622+
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::partialMock(0), map(["" => "@&\Mockery\MockInterface"]));
2623+
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::instance(0), type(1));
2624+
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::spy(0), map(["" => "@&\Mockery\MockInterface"]));
26212625
override(\Illuminate\Support\Arr::add(0), type(0));
26222626
override(\Illuminate\Support\Arr::except(0), type(0));
26232627
override(\Illuminate\Support\Arr::first(0), elementType(0));

_ide_helper.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -9627,12 +9627,12 @@ public static function createFromBase($request)
96279627
* Clones a request and overrides some of its parameters.
96289628
*
96299629
* @return static
9630-
* @param array $query The GET parameters
9631-
* @param array $request The POST parameters
9632-
* @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
9633-
* @param array $cookies The COOKIE parameters
9634-
* @param array $files The FILES parameters
9635-
* @param array $server The SERVER parameters
9630+
* @param array|null $query The GET parameters
9631+
* @param array|null $request The POST parameters
9632+
* @param array|null $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
9633+
* @param array|null $cookies The COOKIE parameters
9634+
* @param array|null $files The FILES parameters
9635+
* @param array|null $server The SERVER parameters
96369636
* @return static
96379637
* @static
96389638
*/

app/Http/Controllers/RouterController.php

+28-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ public function store( StoreRouter $r ): RedirectResponse
122122
return Redirect::to( route( 'router@create' ) )->withInput( $r->all() );
123123
}
124124

125-
Router::create( $r->all() );
125+
$router = Router::create( $r->all() );
126+
127+
$this->checkASN32( $router );
128+
126129
AlertContainer::push( 'Router created.', Alert::SUCCESS );
127130
return Redirect::to( route( "router@list" ) );
128131
}
@@ -181,6 +184,9 @@ public function edit( Router $router ): View
181184
public function update( StoreRouter $r, Router $router ): RedirectResponse
182185
{
183186
$router->update( $r->all() );
187+
188+
$this->checkASN32( $router );
189+
184190
AlertContainer::push( 'Router updated.', Alert::SUCCESS );
185191
return Redirect::to( route( "router@list" ) );
186192
}
@@ -214,4 +220,25 @@ public function delete( Router $router): RedirectResponse
214220
AlertContainer::push( 'Router deleted.', Alert::SUCCESS );
215221
return Redirect::to( route( "router@list" ) );
216222
}
223+
224+
/**
225+
* Warning about asn32's with route servers.
226+
*
227+
*
228+
*
229+
* @param Router $router
230+
* @return void
231+
*/
232+
private function checkASN32( Router $router )
233+
{
234+
if( $router->type == Router::TYPE_ROUTE_SERVER && $router->asn > 65535 ) {
235+
AlertContainer::push( 'You are strongly advised to use / request a dedicated 16-bit ASN from your RIR '
236+
. 'for route server use and in our experience, all RIRs understand this and accommodate it. The route server '
237+
. 'configurations will support an asn32 but to our knowledge, this has never been used in production. '
238+
. 'Also, withouot an asn16, you will be unable to offer your members standard community based filtering. ',
239+
Alert::WARNING
240+
);
241+
}
242+
}
243+
217244
}

app/Http/Requests/StoreRouter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function rules(): array
8080
'operating_system_version' => 'nullable|string|max:255',
8181
'mgmt_host' => 'required|string|max:255',
8282
'api_type' => 'required|integer|in:' . implode( ',', array_keys( Router::$API_TYPES ) ),
83-
'api' => ( $this->api_type !== Router::API_TYPE_NONE ? 'url|required|regex:/.*[^\/]$/' : '' ),
83+
'api' => ( $this->api_type != Router::API_TYPE_NONE ? 'url|required|regex:/.*[^\/]$/' : '' ),
8484
'lg_access' => 'integer' . ( $this->api ? '|required|in:' . implode( ',', array_keys( User::$PRIVILEGES_ALL ) ) : '' ),
8585
];
8686
}

app/Models/Aggregators/ContactGroupAggregator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* @property int $limited_to
4141
* @property \Illuminate\Support\Carbon|null $created_at
4242
* @property \Illuminate\Support\Carbon|null $updated_at
43-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\Contact[] $contacts
43+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\Contact> $contacts
4444
* @property-read int|null $contacts_count
4545
* @method static Builder|ContactGroupAggregator newModelQuery()
4646
* @method static Builder|ContactGroupAggregator newQuery()

app/Models/Aggregators/CustomerAggregator.php

+24-24
Original file line numberDiff line numberDiff line change
@@ -76,58 +76,58 @@
7676
* @property int $peeringdb_oauth
7777
* @property \Illuminate\Support\Carbon|null $created_at
7878
* @property \Illuminate\Support\Carbon|null $updated_at
79-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\AtlasMeasurement[] $AtlasMeasurementsDest
79+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\AtlasMeasurement> $AtlasMeasurementsDest
8080
* @property-read int|null $atlas_measurements_dest_count
81-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\AtlasMeasurement[] $AtlasMeasurementsSource
81+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\AtlasMeasurement> $AtlasMeasurementsSource
8282
* @property-read int|null $atlas_measurements_source_count
83-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\AtlasProbe[] $AtlasProbes
83+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\AtlasProbe> $AtlasProbes
8484
* @property-read int|null $atlas_probes_count
8585
* @property-read \IXP\Models\CompanyBillingDetail|null $companyBillingDetail
8686
* @property-read \IXP\Models\CompanyRegisteredDetail|null $companyRegisteredDetail
87-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\ConsoleServerConnection[] $consoleServerConnections
87+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\ConsoleServerConnection> $consoleServerConnections
8888
* @property-read int|null $console_server_connections_count
89-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\Contact[] $contacts
89+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\Contact> $contacts
9090
* @property-read int|null $contacts_count
91-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\CustomerEquipment[] $customerEquipments
91+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\CustomerEquipment> $customerEquipments
9292
* @property-read int|null $customer_equipments_count
93-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\CustomerNote[] $customerNotes
93+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\CustomerNote> $customerNotes
9494
* @property-read int|null $customer_notes_count
95-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\CustomerToUser[] $customerToUser
95+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\CustomerToUser> $customerToUser
9696
* @property-read int|null $customer_to_user_count
97-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\DocstoreCustomerDirectory[] $docstoreCustomerDirectories
97+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\DocstoreCustomerDirectory> $docstoreCustomerDirectories
9898
* @property-read int|null $docstore_customer_directories_count
99-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\DocstoreCustomerFile[] $docstoreCustomerFiles
99+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\DocstoreCustomerFile> $docstoreCustomerFiles
100100
* @property-read int|null $docstore_customer_files_count
101101
* @property-read \IXP\Models\IrrdbConfig|null $irrdbConfig
102-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\IrrdbPrefix[] $irrdbPrefixes
102+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\IrrdbPrefix> $irrdbPrefixes
103103
* @property-read int|null $irrdb_prefixes_count
104104
* @property-read \IXP\Models\Logo|null $logo
105-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\PatchPanelPortHistory[] $patchPanelPortHistories
105+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\PatchPanelPortHistory> $patchPanelPortHistories
106106
* @property-read int|null $patch_panel_port_histories_count
107-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\PatchPanelPort[] $patchPanelPorts
107+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\PatchPanelPort> $patchPanelPorts
108108
* @property-read int|null $patch_panel_ports_count
109-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\RouteServerFilter[] $peerRouteServerFilters
109+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\RouteServerFilter> $peerRouteServerFilters
110110
* @property-read int|null $peer_route_server_filters_count
111-
* @property-read \Illuminate\Database\Eloquent\Collection|PeeringManager[] $peers
111+
* @property-read \Illuminate\Database\Eloquent\Collection<int, PeeringManager> $peers
112112
* @property-read int|null $peers_count
113-
* @property-read \Illuminate\Database\Eloquent\Collection|PeeringManager[] $peersWith
113+
* @property-read \Illuminate\Database\Eloquent\Collection<int, PeeringManager> $peersWith
114114
* @property-read int|null $peers_with_count
115115
* @property-read Customer|null $resellerObject
116-
* @property-read \Illuminate\Database\Eloquent\Collection|Customer[] $resoldCustomers
116+
* @property-read \Illuminate\Database\Eloquent\Collection<int, Customer> $resoldCustomers
117117
* @property-read int|null $resold_customers_count
118-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\RouteServerFilter[] $routeServerFilters
118+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\RouteServerFilter> $routeServerFilters
119119
* @property-read int|null $route_server_filters_count
120-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\RsPrefix[] $rsPrefixes
120+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\RsPrefix> $rsPrefixes
121121
* @property-read int|null $rs_prefixes_count
122-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\CustomerTag[] $tags
122+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\CustomerTag> $tags
123123
* @property-read int|null $tags_count
124-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\TrafficDaily[] $trafficDailies
124+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\TrafficDaily> $trafficDailies
125125
* @property-read int|null $traffic_dailies_count
126-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\User[] $users
126+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\User> $users
127127
* @property-read int|null $users_count
128-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\VirtualInterface[] $virtualInterfaces
128+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\VirtualInterface> $virtualInterfaces
129129
* @property-read int|null $virtual_interfaces_count
130-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\VlanInterface[] $vlanInterfaces
130+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\VlanInterface> $vlanInterfaces
131131
* @property-read int|null $vlan_interfaces_count
132132
* @method static Builder|Customer active()
133133
* @method static Builder|Customer addressesForVlan(int $vlanid, int $cust, int $protocol)

app/Models/Aggregators/PatchPanelPortAggregator.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
*
3434
* @property-read \IXP\Models\Customer|null $customer
3535
* @property-read PatchPanelPort|null $duplexMasterPort
36-
* @property-read Collection|PatchPanelPort[] $duplexSlavePorts
36+
* @property-read Collection<int, PatchPanelPort> $duplexSlavePorts
3737
* @property-read int|null $duplex_slave_ports_count
3838
* @property-read \IXP\Models\PatchPanel|null $patchPanel
39-
* @property-read Collection|\IXP\Models\PatchPanelPortFile[] $patchPanelPortFiles
39+
* @property-read Collection<int, \IXP\Models\PatchPanelPortFile> $patchPanelPortFiles
4040
* @property-read int|null $patch_panel_port_files_count
41-
* @property-read Collection|\IXP\Models\PatchPanelPortFile[] $patchPanelPortFilesPublic
41+
* @property-read Collection<int, \IXP\Models\PatchPanelPortFile> $patchPanelPortFilesPublic
4242
* @property-read int|null $patch_panel_port_files_public_count
43-
* @property-read Collection|\IXP\Models\PatchPanelPortHistory[] $patchPanelPortHistories
43+
* @property-read Collection<int, \IXP\Models\PatchPanelPortHistory> $patchPanelPortHistories
4444
* @property-read int|null $patch_panel_port_histories_count
4545
* @property-read \IXP\Models\SwitchPort|null $switchPort
4646
* @method static Builder|PatchPanelPort masterPort()

app/Models/Aggregators/RouterAggregator.php

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* IXP\Models\Aggregators\RouterAggregator
3333
*
3434
* @property int $id
35+
* @property int|null $pair_id
3536
* @property int $vlan_id
3637
* @property string $handle
3738
* @property int $protocol
@@ -50,7 +51,9 @@
5051
* @property bool $bgp_lc
5152
* @property string $template
5253
* @property bool $skip_md5
54+
* @property string|null $last_update_started
5355
* @property \Illuminate\Support\Carbon|null $last_updated
56+
* @property int $pause_updates
5457
* @property bool $rpki
5558
* @property string|null $software_version
5659
* @property string|null $operating_system
@@ -76,12 +79,15 @@
7679
* @method static Builder|RouterAggregator whereCreatedAt($value)
7780
* @method static Builder|RouterAggregator whereHandle($value)
7881
* @method static Builder|RouterAggregator whereId($value)
82+
* @method static Builder|RouterAggregator whereLastUpdateStarted($value)
7983
* @method static Builder|RouterAggregator whereLastUpdated($value)
8084
* @method static Builder|RouterAggregator whereLgAccess($value)
8185
* @method static Builder|RouterAggregator whereMgmtHost($value)
8286
* @method static Builder|RouterAggregator whereName($value)
8387
* @method static Builder|RouterAggregator whereOperatingSystem($value)
8488
* @method static Builder|RouterAggregator whereOperatingSystemVersion($value)
89+
* @method static Builder|RouterAggregator wherePairId($value)
90+
* @method static Builder|RouterAggregator wherePauseUpdates($value)
8591
* @method static Builder|RouterAggregator wherePeeringIp($value)
8692
* @method static Builder|RouterAggregator whereProtocol($value)
8793
* @method static Builder|RouterAggregator whereQuarantine($value)

app/Models/Aggregators/SwitcherAggregator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
* @property \Illuminate\Support\Carbon|null $created_at
6565
* @property \Illuminate\Support\Carbon|null $updated_at
6666
* @property-read \IXP\Models\Cabinet|null $cabinet
67-
* @property-read \Illuminate\Database\Eloquent\Collection|\IXP\Models\ConsoleServerConnection[] $consoleServerConnections
67+
* @property-read \Illuminate\Database\Eloquent\Collection<int, \IXP\Models\ConsoleServerConnection> $consoleServerConnections
6868
* @property-read int|null $console_server_connections_count
6969
* @property-read Infrastructure|null $infrastructureModel
70-
* @property-read \Illuminate\Database\Eloquent\Collection|SwitchPort[] $switchPorts
70+
* @property-read \Illuminate\Database\Eloquent\Collection<int, SwitchPort> $switchPorts
7171
* @property-read int|null $switch_ports_count
7272
* @property-read \IXP\Models\Vendor|null $vendor
7373
* @method static Builder|SwitcherAggregator newModelQuery()

0 commit comments

Comments
 (0)