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

openSUSE / agama / 8393553212
25%
master: 72%

Build:
Build:
LAST BUILD BRANCH: storage-volume-keywords
DEFAULT BRANCH: master
Ran 22 Mar 2024 04:46PM UTC
Jobs 2
Files 400
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

22 Mar 2024 04:37PM UTC coverage: 72.105% (-1.5%) from 73.596%
8393553212

push

github

web-flow
Expose the networking API over HTTP  (#1064)

# Implementation PBI description
---

In the previous PBI we documented a possible API and also created a POC
but it just allowed to query some configuration, so we have extended the
PR with the API implementation

## Implemented Network API

<details>
  <summary>Resource <b>/network/state</b></summary>
  
  - GET: get the current network state and general information 
  
  **Request example**
  
  ```json
$ curl -s localhost:3000/api/network/state -H @headers.txt | j
{
  "connectivity": true,
  "wireless_enabled": false,
  "networking_enabled": true
}
```

  - PUT: Update the current network state (currently only enabling wireless is supported)
  
  **Request example**

  ```json

$ cat state.json 
{
  "connectivity": true,
  "wireless_enabled": true,
  "networking_enabled": true
}
  
$ curl -s -X POST localhost:3000/api/network/state -H @headers.txt -H "Content-Type: application/json" -d @state.json  | jq
{
  "connectivity": true,
  "wireless_enabled": true,
  "networking_enabled": true
}
```
  
</details>
  
<details>
  <summary>Resource <b>/network/devices</b></summary>
  
  - GET: list of known devices
    - Attributes
      - Name: String
      - Type: Enum


**Request example**

```json
$ curl -s localhost:3000/network/devices -H @headers.txt | jq
[
  {
    "name": "enp2s0f0",
    "type": "Ethernet"
  },
  {
    "name": "wlp3s0",
    "type": "Wireless"
  },
  {
    "name": "eth0",
    "type": "Ethernet"
  }
 ``` 
</details>

<details>

<summary>Resource <b>/network/connections</b></summary>

  - GET: list of managed / known connections
  **Request example**
  
  ```json
$curl -s localhost:3000/api/network/connections -H @headers.txt | jq
[
  {
    "id": "lo",
    "method4": "manual",
    "method6": "manual",
    "addresses": [
      "127.0.0.1/8",
      "::1"
    ],
    "interface": "lo"
  },
  {
    "i... (continued)

97 of 319 new or added lines in 11 files covered. (30.41%)

104 existing lines in 10 files now uncovered.

10970 of 15214 relevant lines covered (72.1%)

12.42 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
45.1
-1.84% rust/agama-lib/src/network/types.rs
3
62.4
-1.01% rust/agama-server/src/network/dbus/interfaces/connections.rs
3
0.0
-17.39% rust/agama-server/src/web.rs
3
78.57
rust/agama-server/tests/network_service.rs
4
69.52
-2.75% rust/agama-server/src/network/dbus/tree.rs
23
62.22
-3.4% rust/agama-server/src/network/system.rs
41
55.43
rust/agama-server/src/network/web.rs
42
0.0
0.0% rust/agama-server/src/network/nm/adapter.rs
50
60.06
-9.94% rust/agama-server/src/network/model.rs
51
0.0
0.0% rust/agama-server/src/network/nm/client.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
62.4
-1.01% rust/agama-server/src/network/dbus/interfaces/connections.rs
1
0.0
0.0% rust/agama-server/src/network/nm/adapter.rs
3
0.0
-5.56% rust/agama-lib/src/software/client.rs
4
0.0
-10.53% rust/agama-lib/src/product/client.rs
5
0.0
-12.2% rust/agama-lib/src/manager.rs
8
0.0
-17.39% rust/agama-server/src/web.rs
13
0.0
-30.95% rust/agama-server/src/manager/web.rs
15
0.0
-17.86% rust/agama-server/src/questions/web.rs
20
0.0
-22.47% rust/agama-server/src/software/web.rs
34
0.0
-38.64% rust/agama-server/src/web/common.rs
Subprojects
ID Flag name Job ID Ran Files Coverage
1 rust 8393553212.1 22 Mar 2024 04:46PM UTC 84
38.47
GitHub Action Run
1 service 8169459432.1 06 Mar 2024 09:05AM UTC 316
85.22
GitHub Action Run
Source Files on build 8393553212
  • Tree
  • List 400
  • Changed 40
  • Source Changed 13
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #8393553212
  • bc95d15d on github
  • Prev Build on architecture_2024 (#8393060494)
  • Next Build on architecture_2024 (#8422217038)
  • 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