sub all_arguments {
my ( $self, $machine_template ) = @_;
my @all_sids = map { $_->sid } $machine_template->all_systems;
return (
Class->new_from_instance( $self,
sid => {
maximum_size => 3,
+
valid_values => \@all_sids
}
),
Class->new_from_instance( hostname => $self ),
Class->new_from_moose_meta_attribute(
$self->meta->get_attribute('sid') => {
maximum_size => 3,
valid_values => \@all_sids
}
),
Class->new_from_moose_meta_attribute(
$self->meta->get_attribute('hostname')
),
);
}
sub all_arguments_arrayref {
my ( $self, $machine_template ) = @_;
my @all_sids = map { $_->sid } $machine_template->all_systems;
my @arguments = Cloud::SSF::PluginArgument->new_from_moose_meta_at
+tribute(
$self->meta->get_attribute('sid'), {
maximum_length => 3,
valid_values => \@all_sids,
}
),
Cloud::SSF::PluginArgument->new_from_moose_meta_attribute(
$self->meta->get_attribute('depends_on'), {
children => [
Cloud::SSF::PluginArgument->new(
{
name => 'sid',
type => 'Str',
is_required => 1,
children => [],
valid_value => [],
),
Cloud::SSF::PluginArgument->new(
{
name => 'remote_lgtst',
type => 'HashRef',
is_required => 1,
children => [
Cloud::SSF::PluginArgument->new(
{
name => 'port_nr',
is_required => 1,
type => 'Int',
}
),
Cloud::SSF::PluginArgument->new(
{
name => 'port_nr',
type => 'Int',
is_required => 1,
}
),
],
}
),
],
}
);
return \@arguments;
}
|