Skip to content

Instantly share code, notes, and snippets.

View imobachgs's full-sized avatar

Imobach González Sosa imobachgs

View GitHub Profile
@imobachgs
imobachgs / test-agama-api.sh
Last active March 20, 2024 15:47
Shell scripts to test the Agama HTTP API
TOKEN=$(curl --silent http://localhost:3000/api/auth -d '{"password": "your-password"}' \
-H "Content-Type: application/json" | jq .token | tr -d '"')
echo $TOKEN
echo "Content-Type: application/json" >headers.txt
echo -n "Authorization: Bearer " >>headers.txt
echo $TOKEN >>headers.txt
curl --silent -H @headers.txt \
http://localhost:3000/api/software/products | jq
@imobachgs
imobachgs / README.md
Last active November 10, 2023 15:40
[Hack Week 23] Relm4-based user interface for Agama

Relm4-based user interface for Agama

This document summarizes the result of the Relm4-based user interface for Agama which was part of SUSE’s Hack Week 23. It was just an experiment and I do not plan to continue working on it.

However, I will keep the branch in my fork in case anyone is interested, but bear in mind that the code quaility is far from production-ready.

Achievements

The initial idea of the project was to play around with Relm4 and build a simple user interface for Agama. At the end of the, the following features were implemented:

<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<% home_in_sdb = disks.map { |d| d[:device] }.include?("sdb") %>
<partitioning config:type="list">
<drive>
<device>/dev/sda</device>
<disklabel>gpt</disklabel>
<enable_snapshots t="boolean">true</enable_snapshots>
# Copyright (c) [2019] SUSE LLC
#
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@imobachgs
imobachgs / self-update-use-cases.md
Last active February 20, 2017 15:00
Self-Update Uses Cases and Error Handling

Self-Update Use Cases and Error Handling

About this document

This document tries to define how self-update should behave in different scenarios. It contains also some information about which changes should be made.

Requeriments

  1. Minimize the amount of error messages. In a nutshell, we should
@imobachgs
imobachgs / directory-and-namespaces-structure.jpg
Last active June 28, 2018 11:25
Proposal to reorganize YaST2 code
directory-and-namespaces-structure.jpg