| 1 | # Copyright (c) 2015 SUSE LLC | ||
| 2 | # | ||
| 3 | # This program is free software; you can redistribute it and/or modify | ||
| 4 | # it under the terms of the GNU General Public License version 2 as | ||
| 5 | # published by the Free Software Foundation. | ||
| 6 | # | ||
| 7 | # This program is distributed in the hope that it will be useful, | ||
| 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | # GNU General Public License for more details. | ||
| 11 | # | ||
| 12 | # You should have received a copy of the GNU General Public License | ||
| 13 | # along with this program (see the file COPYING); if not, write to the | ||
| 14 | # Free Software Foundation, Inc., | ||
| 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA | ||
| 16 | # | ||
| 17 | package Net::OBS::Client::DTD; | ||
| 18 | |||
| 19 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | has buildstatus =>( | ||
| 22 | is => 'rw', | ||
| 23 | isa => 'ArrayRef', | ||
| 24 | default => sub { | ||
| 25 | return [ | ||
| 26 | 0 | ▶ | 'status' => |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 27 | 'package', | ||
| 28 | 'code', | ||
| 29 | 'status', # obsolete, now code | ||
| 30 | 'error', # obsolete, now details | ||
| 31 | 'versrel', # for withversrel result call | ||
| 32 | [], | ||
| 33 | 'details', | ||
| 34 | |||
| 35 | 'workerid', # last build data | ||
| 36 | 'hostarch', | ||
| 37 | 'readytime', | ||
| 38 | 'starttime', | ||
| 39 | 'endtime', | ||
| 40 | |||
| 41 | 'job', # internal, job when building | ||
| 42 | |||
| 43 | 'uri', # obsolete | ||
| 44 | 'arch', # obsolete | ||
| 45 | ]; | ||
| 46 | }, | ||
| 47 | 1 | ); | |
| 48 | |||
| 49 | |||
| 50 | has binarylist => ( | ||
| 51 | is => 'rw', | ||
| 52 | isa => 'ArrayRef', | ||
| 53 | default => sub { | ||
| 54 | [ | ||
| 55 | 0 | ▶ | 'binarylist' => |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 56 | 'package', | ||
| 57 | [[ 'binary' => | ||
| 58 | 'filename', | ||
| 59 | 'md5', | ||
| 60 | 'size', | ||
| 61 | 'mtime', | ||
| 62 | ]], | ||
| 63 | ]; | ||
| 64 | }, | ||
| 65 | 1 | ); | |
| 66 | |||
| 67 | has summary => ( | ||
| 68 | is => 'rw', | ||
| 69 | isa => 'ArrayRef', | ||
| 70 | default => sub { | ||
| 71 | [ | ||
| 72 | 0 | ▶ | 'summary' => |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 73 | [[ 'statuscount' => | ||
| 74 | 'code', | ||
| 75 | 'count', | ||
| 76 | ]], | ||
| 77 | ]; | ||
| 78 | }, | ||
| 79 | 1 | ); | |
| 80 | |||
| 81 | |||
| 82 | has schedulerstats => ( | ||
| 83 | is => 'rw', | ||
| 84 | isa => 'ArrayRef', | ||
| 85 | default => sub { | ||
| 86 | [ | ||
| 87 | 0 | ▶ | 'stats' => |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 88 | 'lastchecked', | ||
| 89 | 'checktime', | ||
| 90 | 'lastfinished', | ||
| 91 | 'lastpublished', | ||
| 92 | ]; | ||
| 93 | }, | ||
| 94 | 1 | ); | |
| 95 | |||
| 96 | has result => ( | ||
| 97 | is => 'rw', | ||
| 98 | isa => 'ArrayRef', | ||
| 99 | lazy => 1, | ||
| 100 | default => sub { | ||
| 101 | [ | ||
| 102 | 0 | ▶ | 'result' => |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 103 | 'project', | ||
| 104 | 'repository', | ||
| 105 | 'arch', | ||
| 106 | 'code', # pra state, can be "unknown", "broken", "scheduling", "blocked", "building", "finished", "publishing", "published" or "unpublished" | ||
| 107 | 'state', # old name of 'code', to be removed | ||
| 108 | 'details', | ||
| 109 | 'dirty', # marked for re-scheduling if element exists, state might not be correct anymore | ||
| 110 | [ $_[0]->buildstatus ], | ||
| 111 | [ $_[0]->binarylist ], | ||
| 112 | $_[0]->summary, | ||
| 113 | $_[0]->schedulerstats, | ||
| 114 | ]; | ||
| 115 | }, | ||
| 116 | 1 | ); | |
| 117 | |||
| 118 | has resultlist => ( | ||
| 119 | is => 'rw', | ||
| 120 | isa => 'ArrayRef', | ||
| 121 | lazy => 1, | ||
| 122 | default => sub { | ||
| 123 | [ | ||
| 124 | 0 | ▶ | 'resultlist' => |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 125 | 'state', | ||
| 126 | 'retryafter', | ||
| 127 | [ $_[0]->result ], | ||
| 128 | ]; | ||
| 129 | }, | ||
| 130 | 1 | ); | |
| 131 | |||
| 132 | has fileinfo => ( | ||
| 133 | is => 'rw', | ||
| 134 | isa => 'ArrayRef', | ||
| 135 | lazy => 1, | ||
| 136 | default => sub { | ||
| 137 | [ | ||
| 138 | 0 | ▶ | 'fileinfo' => |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 139 | 'filename', | ||
| 140 | [], | ||
| 141 | 'name', | ||
| 142 | 'epoch', | ||
| 143 | 'version', | ||
| 144 | 'release', | ||
| 145 | 'arch', | ||
| 146 | 'source', | ||
| 147 | 'summary', | ||
| 148 | 'description', | ||
| 149 | 'size', | ||
| 150 | 'mtime', | ||
| 151 | [ 'provides' ], | ||
| 152 | [ 'requires' ], | ||
| 153 | [ 'prerequires' ], | ||
| 154 | [ 'conflicts' ], | ||
| 155 | [ 'obsoletes' ], | ||
| 156 | [ 'recommends' ], | ||
| 157 | [ 'supplements' ], | ||
| 158 | [ 'suggests' ], | ||
| 159 | [ 'enhances' ], | ||
| 160 | |||
| 161 | [[ 'provides_ext' => | ||
| 162 | 'dep', | ||
| 163 | [[ 'requiredby' => | ||
| 164 | 'name', | ||
| 165 | 'epoch', | ||
| 166 | 'version', | ||
| 167 | 'release', | ||
| 168 | 'arch', | ||
| 169 | 'project', | ||
| 170 | 'repository', | ||
| 171 | ]], | ||
| 172 | ]], | ||
| 173 | [[ 'requires_ext' => | ||
| 174 | 'dep', | ||
| 175 | [[ 'providedby' => | ||
| 176 | 'name', | ||
| 177 | 'epoch', | ||
| 178 | 'version', | ||
| 179 | 'release', | ||
| 180 | 'arch', | ||
| 181 | 'project', | ||
| 182 | 'repository', | ||
| 183 | ]], | ||
| 184 | ]], | ||
| 185 | ]; | ||
| 186 | }, | ||
| 187 | 1 | ); | |
| 188 | |||
| 189 | 1 | __PACKAGE__->meta->make_immutable(); | |
| 190 | |||
| 191 | |||
| 192 | 1 | 1; | |