hydra: add some admin for adding/enabling/etc build machines

This commit is contained in:
Rob Vermaas
2010-10-13 12:32:57 +00:00
parent 753f5679cb
commit 398993f688
10 changed files with 467 additions and 22 deletions

View File

@ -0,0 +1,81 @@
package Hydra::Schema::BuildMachineSystemTypes;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 NAME
Hydra::Schema::BuildMachineSystemTypes
=cut
__PACKAGE__->table("BuildMachineSystemTypes");
=head1 ACCESSORS
=head2 hostname
data_type: text
default_value: undef
is_foreign_key: 1
is_nullable: 0
size: undef
=head2 system
data_type: text
default_value: undef
is_nullable: 0
size: undef
=cut
__PACKAGE__->add_columns(
"hostname",
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"system",
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
);
__PACKAGE__->set_primary_key("hostname", "system");
=head1 RELATIONS
=head2 hostname
Type: belongs_to
Related object: L<Hydra::Schema::BuildMachines>
=cut
__PACKAGE__->belongs_to(
"hostname",
"Hydra::Schema::BuildMachines",
{ hostname => "hostname" },
{},
);
# Created by DBIx::Class::Schema::Loader v0.05000 @ 2010-10-08 13:47:26
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:F/voQZLNESTotUOWRbg4WA
# You can replace this text with custom content, and it will be preserved on regeneration
1;

View File

@ -0,0 +1,133 @@
package Hydra::Schema::BuildMachines;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 NAME
Hydra::Schema::BuildMachines
=cut
__PACKAGE__->table("BuildMachines");
=head1 ACCESSORS
=head2 hostname
data_type: text
default_value: undef
is_nullable: 0
size: undef
=head2 username
data_type: text
default_value: undef
is_nullable: 0
size: undef
=head2 ssh_key
data_type: text
default_value: undef
is_nullable: 0
size: undef
=head2 options
data_type: text
default_value: undef
is_nullable: 0
size: undef
=head2 maxconcurrent
data_type: integer
default_value: 2
is_nullable: 0
size: undef
=head2 speedfactor
data_type: integer
default_value: 1
is_nullable: 0
size: undef
=head2 enabled
data_type: integer
default_value: 1
is_nullable: 0
size: undef
=cut
__PACKAGE__->add_columns(
"hostname",
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"username",
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"ssh_key",
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"options",
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"maxconcurrent",
{ data_type => "integer", default_value => 2, is_nullable => 0, size => undef },
"speedfactor",
{ data_type => "integer", default_value => 1, is_nullable => 0, size => undef },
"enabled",
{ data_type => "integer", default_value => 1, is_nullable => 0, size => undef },
);
__PACKAGE__->set_primary_key("hostname");
=head1 RELATIONS
=head2 buildmachinesystemtypes
Type: has_many
Related object: L<Hydra::Schema::BuildMachineSystemTypes>
=cut
__PACKAGE__->has_many(
"buildmachinesystemtypes",
"Hydra::Schema::BuildMachineSystemTypes",
{ "foreign.hostname" => "self.hostname" },
);
# Created by DBIx::Class::Schema::Loader v0.05000 @ 2010-10-11 12:58:16
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gje+VA73Hghl7JXp+Fl8pw
# You can replace this text with custom content, and it will be preserved on regeneration
1;