apache / apache/libcloud

[Proposal] Add `Optional` (default `None`) to Node classes

Offen
#1,679 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
api: compute proposal / rfc
Vorherrschende Sprache
Python
Sterne
2.1k
Forks
931
Ø Merge
1 T. 2 Std.
Gemergte PRs (30 T.)
4

Beschreibung

## Proposal

Some classes have attributes that are not required for building a Node.
For example, we don't need the `NodeSize.bandwidth` argument to create a new node. Only the `id` is necessary. But we still have to instanciate the `NodeSize` class with `bandwidth=None` since it's a required argument.
It could be possible to add a default `None` value to each optional argument to make things simpler when using Sizes/Images/Locations.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie mit der Überprüfung der Node-Klassen, insbesondere von NodeSize, sowie der im Vorschlag genannten Klassen Sizes, Images und Locations. Ermitteln Sie, welche Konstruktorargumente optional sind, und verifizieren Sie, dass Nodes instanziiert werden können, ohne diese Werte explizit zu übergeben, während erforderliche Attribute wie id weiterhin notwendig bleiben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
cloud
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.