• 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

New Missed Lines in Diff

Lines Coverage ∆ File
4
0.0
0.0% rust/agama-server/src/web.rs
5
0.0
rust/agama-lib/src/jobs.rs
6
0.0
0.0% rust/agama-server/src/storage/web.rs
11
0.0
rust/agama-lib/src/storage/model/dasd.rs
20
0.0
rust/agama-lib/src/jobs/client.rs
44
0.0
rust/agama-server/src/storage/web/dasd.rs
53
0.0
rust/agama-lib/src/storage/client/dasd.rs
62
0.0
rust/agama-server/src/web/common/jobs.rs
107
0.0
rust/agama-server/src/storage/web/dasd/stream.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
72.73
72.73% rust/agama-lib/src/software/store.rs
1
0.0
0.0% rust/agama-server/src/storage/web.rs
1
0.0
0.0% rust/agama-server/src/web.rs
88
0.0
0.0% rust/agama-server/src/software/web.rs
Subprojects
ID Flag name Job ID Ran Files Coverage
3 rust 10576202577.3 27 Aug 2024 10:25AM UTC 96
24.27
GitHub Action Run
3 service 10564162821.3 26 Aug 2024 05:20PM UTC 366
86.87
GitHub Action Run
3 web 8937163624.3 03 May 2024 09:49AM UTC 343
75.3
GitHub Action Run
Source Files on build 10576202577
  • Tree
  • List 805
  • Changed 6
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • 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

© 2025 Coveralls, Inc