Mail routing parent/children, domain name validation, nodelist import changes and other fixes
This commit is contained in:
@@ -20,7 +20,7 @@ class NodeHierarchy extends Seeder
|
||||
{
|
||||
DB::table('domains')
|
||||
->insert([
|
||||
'name'=>'Domain A',
|
||||
'name'=>'domain-a',
|
||||
'active'=>TRUE,
|
||||
'public'=>TRUE,
|
||||
'default'=>FALSE,
|
||||
@@ -30,7 +30,7 @@ class NodeHierarchy extends Seeder
|
||||
|
||||
DB::table('domains')
|
||||
->insert([
|
||||
'name'=>'Domain B',
|
||||
'name'=>'domain-b',
|
||||
'active'=>TRUE,
|
||||
'public'=>TRUE,
|
||||
'default'=>FALSE,
|
||||
@@ -38,7 +38,7 @@ class NodeHierarchy extends Seeder
|
||||
'updated_at'=>Carbon::now(),
|
||||
]);
|
||||
|
||||
foreach (['Domain A','Domain B'] as $domain) {
|
||||
foreach (['domain-a','domain-b'] as $domain) {
|
||||
$domain = Domain::where('name',$domain)->singleOrFail();
|
||||
$this->hierarchy($domain,100);
|
||||
$this->hierarchy($domain,101);
|
||||
@@ -66,6 +66,19 @@ class NodeHierarchy extends Seeder
|
||||
]);
|
||||
|
||||
$zo = Zone::where('zone_id',$zoneid)->where('domain_id',$domain->id)->singleOrFail();
|
||||
DB::table('addresses')
|
||||
->insert([
|
||||
'zone_id'=>$zo->id,
|
||||
'active'=>TRUE,
|
||||
'region_id'=>0,
|
||||
'host_id'=>0,
|
||||
'node_id'=>0,
|
||||
'point_id'=>0,
|
||||
'system_id'=>$so->id,
|
||||
'role'=>DomainController::NODE_ZC,
|
||||
'created_at'=>Carbon::now(),
|
||||
'updated_at'=>Carbon::now(),
|
||||
]);
|
||||
|
||||
// Nodes
|
||||
foreach ($nodes as $nid) {
|
||||
@@ -120,7 +133,7 @@ class NodeHierarchy extends Seeder
|
||||
|
||||
// Hosts
|
||||
foreach ($hosts as $hid) {
|
||||
$hostid = $rid*100+$hid;
|
||||
$hostid = $rid*10+$hid;
|
||||
$so = $this->system(sprintf('Host %03d:%03d/0.0@%s (Region %03d)',$zoneid,$hostid,$domain->name,$rid));
|
||||
DB::table('addresses')
|
||||
->insert([
|
||||
|
Reference in New Issue
Block a user