• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openSUSE / agama / 10576202577
72%

Build:
DEFAULT BRANCH: master
Ran 27 Aug 2024 10:25AM UTC
Jobs 3
Files 805
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Aug 2024 10:17AM UTC coverage: 70.632% (-0.7%) from 71.319%
10576202577

push

github

web-flow
feat(rust): add an HTTP/JSON API to DASD operations (#1532)

Trello:
https://trello.com/c/2LC8JEZR/3743-8-agama-adapt-dasd-configuration-to-current-architecture

This PR is the first step to bring back support for DASD devices on
s390x architectures. It includes:

* Extending the HTTP API to expose DASD devices and formatting jobs.
* Adding DASD-related events (adding, updating and changing DASD devices
and format progress).

After some discussion, we decided to retain the original intention of
the D-Bus API at HTTP level.

## Examples

This section contains a few examples you can use to explore the API. For
the ones using `curl`, it is required to have a `headers.txt` file
containing the credentials (similar to the following example, but
replacing `TOKEN` with your actual token):

```
Content-Type: application/json
Authorization: Bearer TOKEN
```

<details>
<summary>DASD operations</summary>

Remember that the `-k` disables the SSL certificate checking.

### Probing for DASD devices

```bash
curl -k -H @headers.txt -X POST https://$AGAMA_SERVER/api/storage/dasd/probe
```

### Listing DASD devices

```bash
$ curl -k --silent -H @headers.txt -X GET https://$AGAMA_SERVER/api/storage/dasd/devices | jq
[
  {
    "id": "0.0.0160",
    "enabled": true,
    "device_name": "dasda",
    "formatted": true,
    "diag": false,
    "status": "active",
    "device_type": "ECKD",
    "access_type": "rw",
    "partition_info": ""
  }
]
```

### Enabling DASD devices

> [!NOTE]
> We might consider using `PATCH` or even `POST` for enabling,
disabling, setting diag and formatting the device.

```bash
$ curl -k -H @headers.txt -X POST https://$AGAMA_SERVER/api/storage/dasd/enable \
  -d '{"devices": ["0.0.0160"]}'
```

### Disabling devices

```bash
$ curl -k -H @headers.txt -X POST https://$AGAMA_SERVER/api/storage/dasd/disable \
  -d '{"devices": ["0.0.0160"]}'
```

### Setting the DIAG attribute... (continued)

1987 of 2868 branches covered (69.28%)

Branch coverage included in aggregate %.

0 of 312 new or added lines in 9 files covered. (0.0%)

91 existing lines in 4 files now uncovered.

19801 of 27979 relevant lines covered (70.77%)

34.42 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
3 rust 10576202577.3 27 Aug 2024 10:25AM UTC 0
24.27
GitHub Action Run
3 service 10564162821.3 26 Aug 2024 05:20PM UTC 0
86.87
GitHub Action Run
3 web 8937163624.3 03 May 2024 09:49AM UTC 0
75.3
GitHub Action Run
Source Files on build 10576202577
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #10576202577
  • 005f61f7 on github
  • Prev Build on master (#10564162821)
  • Next Build on master (#10576311903)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc