(self)
| 2404 | return [self.api_port or 5000] |
| 2405 | |
| 2406 | def validate(self) -> None: |
| 2407 | super(IscsiServiceSpec, self).validate() |
| 2408 | |
| 2409 | if not self.pool: |
| 2410 | raise SpecValidationError( |
| 2411 | 'Cannot add ISCSI: No Pool specified') |
| 2412 | |
| 2413 | # Do not need to check for api_user and api_password as they |
| 2414 | # now default to 'admin' when setting up the gateway url. Older |
| 2415 | # iSCSI specs from before this change should be fine as they will |
| 2416 | # have been required to have an api_user and api_password set and |
| 2417 | # will be unaffected by the new default value. |
| 2418 | |
| 2419 | |
| 2420 | yaml.add_representer(IscsiServiceSpec, ServiceSpec.yaml_representer) |
no test coverage detected