Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Allow aleph instance list to handle PAYG #224

Merged
merged 4 commits into from
Jul 2, 2024

Conversation

1yam
Copy link
Collaborator

@1yam 1yam commented Jun 28, 2024

Problem:
aleph instance list only handles the Hold method.

Solution:
Check the payment type and fetch api_url and ipv6 from /about/executions/list.

Changes:

  • Added logic to check if there is a payment associated with the message.
  • If there is no payment, the function fetches the VM details from the scheduler API.
  • If there is a payment, the function fetches the server URL and retrieves the ipv6 address from the node's execution list

@1yam 1yam changed the title Feature: Allow aleph instance list to handle PAYG Refactor Allow aleph instance list to handle PAYG Jun 28, 2024
@1yam 1yam changed the title Refactor Allow aleph instance list to handle PAYG Refactor: Allow aleph instance list to handle PAYG Jun 28, 2024
Copy link

Failed to retrieve llama text: POST 504:

504 Gateway Time-out


The server didn't respond in time.

@Psycojoker Psycojoker merged commit 6b61070 into master Jul 2, 2024
16 checks passed
@Psycojoker Psycojoker deleted the 1yam-payg-instance-list branch July 2, 2024 16:37
olethanh added a commit that referenced this pull request Jul 23, 2024
# Summary
This PR introduces new commands for managing virtual machine instances. These commands provide users with enhanced control over their VMs.

## New Commands
The following commands have been added:

1. **Notify Instance**: 

   ```shell
   aleph instance notify {vm_id} {domain}
   ```

   Sends a notification to the specified VM instance within the given domain.

2. **Stop Instance**:

   ```shell
   aleph instance stop {vm_id} {domain}
   ```

   Stops the specified VM instance within the given domain.

3. **Reboot Instance**:

   ```shell
   aleph instance reboot {vm_id} {domain}
   ```

   Reboots the specified VM instance within the given domain.

4. **Erase Instance**:

   ```shell
   aleph instance erase {vm_id} {domain}
   ```

   Erases the specified VM instance within the given domain, securely deleting all data.

5. **Expire Instance**:

   ```shell
   aleph instance expire {vm_id} {domain}
   ```

Commits

* Temp: this commit should be revert when mergin

* Feature: instance operator commande

* Fix: isort issue

* Fix: wrong slug in pytest.yml

* Refactor: Allow aleph instance list to handle PAYG (#224)

This is done by going threw all nodes look for the one with the correct hash.

* Update src/aleph_client/commands/instance/__init__.py

Co-authored-by: Olivier Le Thanh Duong <olivier@lethanh.be>

* Temp: this commit should be revert when mergin

* Feature: instance operator commande

* Fix: isort issue

* Update src/aleph_client/commands/instance/__init__.py

Co-authored-by: Olivier Le Thanh Duong <olivier@lethanh.be>

* Fix: conflicts

* Fix: clean format for logs

* Fix: use release candidate of aleph-sdk-python

---------

Co-authored-by: Hugo Herter <git@hugoherter.com>
Co-authored-by: Olivier Le Thanh Duong <olivier@lethanh.be>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants