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

openSUSE / agama / 10576202577 / 3 – rust
72%
master: 72%

Build:
DEFAULT BRANCH: master
Ran 27 Aug 2024 10:26AM UTC
Files 96
Run time 2s
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: 24.27%. First build
rust – 10576202577.3

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)

1405 of 5789 relevant lines covered (24.27%)

0.75 hits per line

Source Files on job rust - 10576202577.3
  • Tree
  • List 96
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10576202577
  • 005f61f7 on github
  • Prev Job for on master (#10564162821.)
  • Next Job for on master (#10576311903.3)
  • 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