mirror of https://github.com/apache/jclouds.git
Issue 36: refactored so that options are an enum type
git-svn-id: http://jclouds.googlecode.com/svn/trunk@889 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
655b34dc9e
commit
7804b2f8c6
|
@ -69,6 +69,7 @@ sub parse_file {
|
|||
}
|
||||
|
||||
sub parse {
|
||||
|
||||
#return parse_file(shift);
|
||||
|
||||
return parse_url(shift);
|
||||
|
@ -144,7 +145,7 @@ sub build_app {
|
|||
sub build_query {
|
||||
my $type = shift;
|
||||
my $query = build_bean( $type, "Request" );
|
||||
my $tree = parse(${ $query->{see} }[0]);
|
||||
my $tree = parse( ${ $query->{see} }[0] );
|
||||
|
||||
my @{seeAlsoA} =
|
||||
$tree->look_down( '_tag', 'div', 'class', 'itemizedlist' )
|
||||
|
@ -208,10 +209,14 @@ sub build_fields {
|
|||
elsif (s/Valid Values: //) {
|
||||
if (/\|/) {
|
||||
my @valid_values = split(' \| ');
|
||||
$param{valid_values} = \@valid_values;
|
||||
my $enum;
|
||||
foreach my $value (@valid_values) {
|
||||
$enum->{$value} = $value;
|
||||
}
|
||||
$param{enum} = $enum;
|
||||
}
|
||||
elsif (/([0-9]+) ?\-([0-9]+)/) {
|
||||
$param{valid_values} = "$1-$2";
|
||||
$param{constraints} = "$1-$2";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -246,6 +251,7 @@ sub build_bean {
|
|||
s/$class//;
|
||||
}
|
||||
else {
|
||||
|
||||
# if we are the query object, then there is a different master url.
|
||||
$see = "${refUrl}/ApiReference-query-${type}.html";
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue