From b90a682fe6526ff9de1487cbbd784c7fa19c3c80 Mon Sep 17 00:00:00 2001 From: ivanmilevtues Date: Sat, 31 May 2025 03:46:11 +0200 Subject: [PATCH] Add CodeBoarding documentation --- CodeBoarding/AccountResource.md | 31 +++++++++++++ CodeBoarding/CDNResource.md | 24 ++++++++++ CodeBoarding/ComputeResource.md | 49 ++++++++++++++++++++ CodeBoarding/ImageResource.md | 20 +++++++++ CodeBoarding/NetworkResource.md | 38 ++++++++++++++++ CodeBoarding/ProjectResource.md | 13 ++++++ CodeBoarding/ResourceManager.md | 19 ++++++++ CodeBoarding/SSHKeyResource.md | 19 ++++++++ CodeBoarding/StorageResource.md | 27 +++++++++++ CodeBoarding/VPCResource.md | 20 +++++++++ CodeBoarding/on_boarding.md | 80 +++++++++++++++++++++++++++++++++ 11 files changed, 340 insertions(+) create mode 100644 CodeBoarding/AccountResource.md create mode 100644 CodeBoarding/CDNResource.md create mode 100644 CodeBoarding/ComputeResource.md create mode 100644 CodeBoarding/ImageResource.md create mode 100644 CodeBoarding/NetworkResource.md create mode 100644 CodeBoarding/ProjectResource.md create mode 100644 CodeBoarding/ResourceManager.md create mode 100644 CodeBoarding/SSHKeyResource.md create mode 100644 CodeBoarding/StorageResource.md create mode 100644 CodeBoarding/VPCResource.md create mode 100644 CodeBoarding/on_boarding.md diff --git a/CodeBoarding/AccountResource.md b/CodeBoarding/AccountResource.md new file mode 100644 index 0000000..a356406 --- /dev/null +++ b/CodeBoarding/AccountResource.md @@ -0,0 +1,31 @@ +```mermaid +graph LR + Account["Account"] + Balance["Balance"] + Manager["Manager"] + AccountResource["AccountResource"] + Manager -- "retrieves account information" --> Account + Manager -- "retrieves balance information" --> Balance + AccountResource -- "interacts with" --> Manager +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The DigitalOcean Account and Balance subsystem provides functionality to retrieve account information and balance details from the DigitalOcean API. The core components include the Account, Balance, and Manager classes. The Manager class acts as an intermediary, interacting with the DigitalOcean API to fetch account and balance data. The Account and Balance classes encapsulate the data and provide methods to load data from the API response. + +### Account +The Account component represents a DigitalOcean account. It provides methods for retrieving account information and loading account data from the DigitalOcean API. It encapsulates account attributes such as email, UUID, and droplet limit. +- **Related Classes/Methods**: `digitalocean.Account.Account` (5:35), `digitalocean.Account.Account:__init__` (6:15), `digitalocean.Account.Account:get_object` (18:24), `digitalocean.Account.Account:load` (26:32) + +### Balance +The Balance component represents the balance of a DigitalOcean account. It provides methods for retrieving balance information and loading balance data from the DigitalOcean API. It encapsulates balance attributes such as account balance, month to date usage, and billing rate. +- **Related Classes/Methods**: `digitalocean.Balance.Balance` (5:31), `digitalocean.Balance.Balance:__init__` (6:12), `digitalocean.Balance.Balance:get_object` (15:21), `digitalocean.Balance.Balance:load` (23:28) + +### Manager +The Manager component is responsible for managing interactions with the DigitalOcean API. It provides methods for retrieving account and balance information. It acts as a central point for accessing account and balance data. +- **Related Classes/Methods**: `digitalocean.Manager.Manager:get_account` (34:38), `digitalocean.Manager.Manager:get_balance` (40:44) + +### AccountResource +The AccountResource component represents a DigitalOcean Account and Balance. It provides methods for retrieving account and balance information. It interacts with the ResourceManager to perform these actions. +- **Related Classes/Methods**: `digitalocean.Account.Account` (5:35), `digitalocean.Balance.Balance` (5:31) \ No newline at end of file diff --git a/CodeBoarding/CDNResource.md b/CodeBoarding/CDNResource.md new file mode 100644 index 0000000..7d740bc --- /dev/null +++ b/CodeBoarding/CDNResource.md @@ -0,0 +1,24 @@ +```mermaid +graph LR + CDNEndpoint["CDNEndpoint"] + Manager["Manager"] + Manager -- "manages" --> CDNEndpoint + CDNEndpoint -- "creates" --> CDNEndpoint + CDNEndpoint -- "deletes" --> CDNEndpoint + CDNEndpoint -- "saves" --> CDNEndpoint + CDNEndpoint -- "loads" --> CDNEndpoint + CDNEndpoint -- "gets object" --> CDNEndpoint +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The DigitalOcean CDN management subsystem allows users to create, retrieve, update, and delete CDN endpoints. The Manager component serves as the entry point for accessing CDN endpoint resources, while the CDNEndpoint component represents a single CDN endpoint and provides methods for interacting with the DigitalOcean API to manage the endpoint's lifecycle. + +### CDNEndpoint +Represents a CDN Endpoint in DigitalOcean. It allows for creating, retrieving, updating, and deleting CDN endpoints. It interacts with the DigitalOcean API to manage CDN endpoint resources. +- **Related Classes/Methods**: `digitalocean.CDNEndpoint.CDNEndpoint` (5:102), `digitalocean.CDNEndpoint.CDNEndpoint:__init__` (23:32), `digitalocean.CDNEndpoint.CDNEndpoint:get_object` (35:44), `digitalocean.CDNEndpoint.CDNEndpoint:load` (46:56), `digitalocean.CDNEndpoint.CDNEndpoint:create` (58:76), `digitalocean.CDNEndpoint.CDNEndpoint:delete` (79:83), `digitalocean.CDNEndpoint.CDNEndpoint:save` (85:98) + +### Manager +The Manager class provides methods for retrieving CDN endpoints. It serves as an entry point for accessing CDN endpoint resources and interacts with the DigitalOcean API. +- **Related Classes/Methods**: `digitalocean.Manager.Manager` (30:481), `digitalocean.Manager.Manager:get_cdn_endpoint` (471:478), `digitalocean.Manager.Manager:get_all_cdn_endpoints` (459:469) \ No newline at end of file diff --git a/CodeBoarding/ComputeResource.md b/CodeBoarding/ComputeResource.md new file mode 100644 index 0000000..f5e4edf --- /dev/null +++ b/CodeBoarding/ComputeResource.md @@ -0,0 +1,49 @@ +```mermaid +graph LR + Droplet["Droplet"] + Droplet_create["Droplet:create"] + Droplet_get_object["Droplet:get_object"] + Droplet__perform_action["Droplet:_perform_action"] + Droplet_destroy["Droplet:destroy"] + Droplet_get_actions["Droplet:get_actions"] + Droplet_get_action["Droplet:get_action"] + Droplet -- "creates" --> Droplet_create + Droplet -- "retrieves" --> Droplet_get_object + Droplet -- "performs actions using" --> Droplet__perform_action + Droplet -- "destroys" --> Droplet_destroy + Droplet -- "retrieves actions using" --> Droplet_get_actions + Droplet -- "retrieves a specific action using" --> Droplet_get_action +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The ComputeResource component, represented by the DigitalOcean Droplet, manages virtual servers (Droplets) through the DigitalOcean API. It encompasses functionalities for creating, retrieving, and destroying Droplets, as well as performing actions like power on/off, reboot, resizing, snapshotting, and managing backups. The component interacts with the DigitalOcean API to provision and manage these resources. + +### Droplet +Represents a DigitalOcean Droplet. It provides methods for creating, retrieving, and managing Droplets, including actions like power on/off, reboot, resize, snapshot, and more. It interacts with the DigitalOcean API to perform these operations. +- **Related Classes/Methods**: `digitalocean.Droplet.Droplet` (25:661) + +### Droplet:create +Creates a new Droplet. It takes parameters such as name, region, size, image, SSH keys, backups, IPv6, private networking, and user data. It sends a POST request to the DigitalOcean API to create the Droplet. +- **Related Classes/Methods**: `digitalocean.Droplet.Droplet:create` (532:574) + +### Droplet:get_object +Retrieves a specific Droplet by its ID. It sends a GET request to the DigitalOcean API to retrieve the Droplet's information. +- **Related Classes/Methods**: `digitalocean.Droplet.Droplet:get_object` (104:113) + +### Droplet:_perform_action +A helper method that performs an action on a Droplet, such as power on/off, reboot, etc. It sends a POST request to the DigitalOcean API to initiate the action. +- **Related Classes/Methods**: `digitalocean.Droplet.Droplet:_perform_action` (207:233) + +### Droplet:destroy +Destroys a Droplet. It sends a DELETE request to the DigitalOcean API to remove the Droplet. +- **Related Classes/Methods**: `digitalocean.Droplet.Droplet:destroy` (412:418) + +### Droplet:get_actions +Retrieves all actions performed on a Droplet. It sends a GET request to the DigitalOcean API to retrieve the actions. +- **Related Classes/Methods**: `digitalocean.Droplet.Droplet:get_actions` (583:597) + +### Droplet:get_action +Retrieves a specific action performed on a Droplet by its ID. It sends a GET request to the DigitalOcean API to retrieve the action. +- **Related Classes/Methods**: `digitalocean.Droplet.Droplet:get_action` (599:608) \ No newline at end of file diff --git a/CodeBoarding/ImageResource.md b/CodeBoarding/ImageResource.md new file mode 100644 index 0000000..ae50b1e --- /dev/null +++ b/CodeBoarding/ImageResource.md @@ -0,0 +1,20 @@ +```mermaid +graph LR + Image["Image"] + Manager["Manager"] + Image -- "Interacts with" --> Manager + Manager -- "Manages" --> Image +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The DigitalOcean Image management subsystem allows users to manage their images (snapshots and distributions) on the DigitalOcean platform. It provides functionalities to list, retrieve, create, destroy, transfer, and rename images. The core components are the Image class, which represents a single image, and the Manager class, which handles collections of images and interacts with the DigitalOcean API. + +### Image +Represents a DigitalOcean Image. It allows for creating, loading, destroying, transferring, and renaming images. It interacts with the Manager to perform these actions. +- **Related Classes/Methods**: `digitalocean.Image.Image` (5:162), `digitalocean.Image.Image:__init__` (44:61), `digitalocean.Image.Image:get_object` (64:78), `digitalocean.Image.Image:create` (93:111), `digitalocean.Image.Image:load` (113:133), `digitalocean.Image.Image:destroy` (135:139), `digitalocean.Image.Image:transfer` (141:149), `digitalocean.Image.Image:rename` (151:159) + +### Manager +The Manager class is responsible for managing DigitalOcean Images. It provides methods for retrieving different types of images (all, my, global, distro, app) and a specific image by its ID. +- **Related Classes/Methods**: `digitalocean.Manager.Manager` (30:481), `digitalocean.Manager.Manager:get_images` (118:133), `digitalocean.Manager.Manager:get_all_images` (135:141), `digitalocean.Manager.Manager:get_image` (143:150), `digitalocean.Manager.Manager:get_my_images` (152:158), `digitalocean.Manager.Manager:get_global_images` (160:172), `digitalocean.Manager.Manager:get_distro_images` (174:180), `digitalocean.Manager.Manager:get_app_images` (182:188) \ No newline at end of file diff --git a/CodeBoarding/NetworkResource.md b/CodeBoarding/NetworkResource.md new file mode 100644 index 0000000..d806b4c --- /dev/null +++ b/CodeBoarding/NetworkResource.md @@ -0,0 +1,38 @@ +```mermaid +graph LR + Domain["Domain"] + Record["Record"] + FloatingIP["FloatingIP"] + LoadBalancer["LoadBalancer"] + Firewall["Firewall"] + Domain -- "manages" --> Record + LoadBalancer -- "associates with" --> Droplets + Firewall -- "associates with" --> Droplets + Firewall -- "associates with" --> Tags + FloatingIP -- "assigns to" --> Droplets +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The DigitalOcean Networking Resource Management system provides an interface for managing various networking resources on the DigitalOcean platform. It encompasses components for handling Domains, DNS Records, Floating IPs, Load Balancers, and Firewalls. These components allow users to create, retrieve, update, and delete these resources, enabling them to configure and manage their network infrastructure on DigitalOcean. + +### Domain +The Domain component manages domain names and their associated DNS records on DigitalOcean. It provides functionalities to create, retrieve, update, and delete domains and their records. It interacts with the DigitalOcean API to perform these operations. +- **Related Classes/Methods**: `digitalocean.Domain.Domain` (6:172), `digitalocean.Domain.Domain:__init__` (7:13), `digitalocean.Domain.Domain:get_object` (16:22), `digitalocean.Domain.Domain:load` (24:30), `digitalocean.Domain.Domain:destroy` (32:37), `digitalocean.Domain.Domain:create_new_domain_record` (39:90), `digitalocean.Domain.Domain:update_domain_record` (92:126), `digitalocean.Domain.Domain:delete_domain_record` (128:137), `digitalocean.Domain.Domain:create` (139:150), `digitalocean.Domain.Domain:get_records` (152:169) + +### Record +The Record component represents a DNS record within a domain. It allows for creating, retrieving, updating, and deleting individual DNS records. It interacts with the Domain component to manage records within a specific domain. +- **Related Classes/Methods**: `digitalocean.Record.Record` (5:126), `digitalocean.Record.Record:__init__` (23:36), `digitalocean.Record.Record:get_object` (39:45), `digitalocean.Record.Record:create` (47:83), `digitalocean.Record.Record:destroy` (85:92), `digitalocean.Record.Record:save` (94:113), `digitalocean.Record.Record:load` (115:123) + +### FloatingIP +The FloatingIP component manages floating IP addresses, which are publicly accessible static IP addresses that can be reassigned between Droplets. It provides functionalities to create, retrieve, assign, unassign, and delete floating IPs. It interacts with the DigitalOcean API and Droplet component to manage IP assignments. +- **Related Classes/Methods**: `digitalocean.FloatingIP.FloatingIP` (5:112), `digitalocean.FloatingIP.FloatingIP:__init__` (6:11), `digitalocean.FloatingIP.FloatingIP:get_object` (14:24), `digitalocean.FloatingIP.FloatingIP:load` (26:39), `digitalocean.FloatingIP.FloatingIP:create` (41:59), `digitalocean.FloatingIP.FloatingIP:reserve` (61:80), `digitalocean.FloatingIP.FloatingIP:destroy` (82:86), `digitalocean.FloatingIP.FloatingIP:assign` (88:99), `digitalocean.FloatingIP.FloatingIP:unassign` (101:109) + +### LoadBalancer +The LoadBalancer component manages load balancers, which distribute network traffic across multiple Droplets. It provides functionalities to create, retrieve, update, and delete load balancers, as well as manage their associated Droplets and forwarding rules. It interacts with the DigitalOcean API and Droplet component to manage load balancing configurations. +- **Related Classes/Methods**: `digitalocean.LoadBalancer.LoadBalancer` (85:380), `digitalocean.LoadBalancer.LoadBalancer:__init__` (145:163), `digitalocean.LoadBalancer.LoadBalancer:get_object` (166:176), `digitalocean.LoadBalancer.LoadBalancer:load` (178:203), `digitalocean.LoadBalancer.LoadBalancer:create` (205:283), `digitalocean.LoadBalancer.LoadBalancer:save` (285:315), `digitalocean.LoadBalancer.LoadBalancer:destroy` (317:321), `digitalocean.LoadBalancer.LoadBalancer:add_droplets` (323:334), `digitalocean.LoadBalancer.LoadBalancer:remove_droplets` (336:347), `digitalocean.LoadBalancer.LoadBalancer:add_forwarding_rules` (349:362), `digitalocean.LoadBalancer.LoadBalancer:remove_forwarding_rules` (364:377) + +### Firewall +The Firewall component manages firewalls, which control network traffic to and from Droplets. It provides functionalities to create, retrieve, update, and delete firewalls, as well as manage their inbound and outbound rules, and associated Droplets and tags. It interacts with the DigitalOcean API and Droplet component to manage firewall configurations. +- **Related Classes/Methods**: `digitalocean.Firewall.Firewall` (104:303), `digitalocean.Firewall.Firewall:__init__` (134:145), `digitalocean.Firewall.Firewall:get_object` (148:154), `digitalocean.Firewall.Firewall:_set_firewall_attributes` (156:173), `digitalocean.Firewall.Firewall:load` (175:180), `digitalocean.Firewall.Firewall:create` (182:196), `digitalocean.Firewall.Firewall:add_inbound` (198:210), `digitalocean.Firewall.Firewall:add_outbound` (212:224), `digitalocean.Firewall.Firewall:remove_inbound` (226:238), `digitalocean.Firewall.Firewall:remove_outbound` (240:252), `digitalocean.Firewall.Firewall:add_droplets` (254:262), `digitalocean.Firewall.Firewall:remove_droplets` (264:272), `digitalocean.Firewall.Firewall:add_tags` (274:282), `digitalocean.Firewall.Firewall:remove_tags` (284:292), `digitalocean.Firewall.Firewall:destroy` (296:300) \ No newline at end of file diff --git a/CodeBoarding/ProjectResource.md b/CodeBoarding/ProjectResource.md new file mode 100644 index 0000000..60d00bc --- /dev/null +++ b/CodeBoarding/ProjectResource.md @@ -0,0 +1,13 @@ +```mermaid +graph LR + Project["Project"] +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The DigitalOcean Project management subsystem allows users to create, retrieve, update, and delete projects, as well as manage resources associated with those projects. The core component is the `Project` class, which encapsulates the project's data and provides methods for interacting with the DigitalOcean API. The `Project` component relies on the `ResourceManager` to handle the actual API calls for project management and resource assignment. + +### Project +Represents a DigitalOcean Project. It allows creating, deleting, updating, and managing resources within a project. It also handles loading project details and resources from the DigitalOcean API. +- **Related Classes/Methods**: `digitalocean.Project.Project` (4:144), `digitalocean.Project.Project:__init__` (5:17), `digitalocean.Project.Project:get_object` (20:29), `digitalocean.Project.Project:load` (31:36), `digitalocean.Project.Project:set_as_default_project` (38:49), `digitalocean.Project.Project:create_project` (51:86), `digitalocean.Project.Project:delete_project` (88:90), `digitalocean.Project.Project:update_project` (92:120), `digitalocean.Project.Project:get_all_resources` (122:128), `digitalocean.Project.Project:load_resources` (130:135), `digitalocean.Project.Project:assign_resource` (137:141) \ No newline at end of file diff --git a/CodeBoarding/ResourceManager.md b/CodeBoarding/ResourceManager.md new file mode 100644 index 0000000..63dabcc --- /dev/null +++ b/CodeBoarding/ResourceManager.md @@ -0,0 +1,19 @@ +```mermaid +graph LR + Manager["Manager"] + BaseAPI["BaseAPI"] + Manager -- "uses" --> BaseAPI +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The ResourceManager component, embodied primarily by the `Manager` class, acts as the central interface for interacting with the DigitalOcean API. It handles authentication via an API token, constructs and executes API requests using the `BaseAPI` class, and processes the responses. The `Manager` class provides a suite of methods to retrieve, create, update, and delete various DigitalOcean resources, such as droplets, images, domains, and load balancers. It delegates the actual API interactions to the `BaseAPI` class, which manages the low-level details of HTTP requests and response handling. + +### Manager +The Manager class serves as the primary interface for interacting with the DigitalOcean API. It provides methods for retrieving various resources such as droplets, images, domains, and keys. It initializes with an API token and uses the BaseAPI class to handle the underlying API requests. +- **Related Classes/Methods**: `digitalocean.Manager.Manager` (30:481), `digitalocean.Manager.Manager:__init__` (31:32), `digitalocean.Manager.Manager:get_account` (34:38), `digitalocean.Manager.Manager:get_balance` (40:44), `digitalocean.Manager.Manager:get_all_regions` (46:56), `digitalocean.Manager.Manager:get_all_droplets` (58:98), `digitalocean.Manager.Manager:get_droplet` (100:104), `digitalocean.Manager.Manager:get_all_sizes` (106:116), `digitalocean.Manager.Manager:get_images` (118:133), `digitalocean.Manager.Manager:get_all_images` (135:141), `digitalocean.Manager.Manager:get_image` (143:150), `digitalocean.Manager.Manager:get_my_images` (152:158), `digitalocean.Manager.Manager:get_global_images` (160:172), `digitalocean.Manager.Manager:get_distro_images` (174:180), `digitalocean.Manager.Manager:get_app_images` (182:188), `digitalocean.Manager.Manager:get_all_domains` (190:200), `digitalocean.Manager.Manager:get_domain` (202:206), `digitalocean.Manager.Manager:get_all_sshkeys` (208:218), `digitalocean.Manager.Manager:get_ssh_key` (220:224), `digitalocean.Manager.Manager:get_all_tags` (226:233), `digitalocean.Manager.Manager:get_action` (235:239), `digitalocean.Manager.Manager:get_all_floating_ips` (241:251), `digitalocean.Manager.Manager:get_floating_ip` (253:257), `digitalocean.Manager.Manager:get_all_load_balancers` (259:276), `digitalocean.Manager.Manager:get_load_balancer` (278:285), `digitalocean.Manager.Manager:get_certificate` (287:294), `digitalocean.Manager.Manager:get_all_certificates` (296:307), `digitalocean.Manager.Manager:get_snapshot` (309:315), `digitalocean.Manager.Manager:get_all_snapshots` (317:325), `digitalocean.Manager.Manager:get_droplet_snapshots` (327:335), `digitalocean.Manager.Manager:get_volume_snapshots` (337:345), `digitalocean.Manager.Manager:get_all_volumes` (347:371), `digitalocean.Manager.Manager:get_volume` (373:377), `digitalocean.Manager.Manager:get_all_firewalls` (379:397), `digitalocean.Manager.Manager:get_firewall` (399:406), `digitalocean.Manager.Manager:get_vpc` (408:414), `digitalocean.Manager.Manager:get_all_vpcs` (416:427), `digitalocean.Manager.Manager:get_all_projects` (429:439), `digitalocean.Manager.Manager:get_project` (441:448), `digitalocean.Manager.Manager:get_default_project` (450:457), `digitalocean.Manager.Manager:get_all_cdn_endpoints` (459:469), `digitalocean.Manager.Manager:get_cdn_endpoint` (471:478) + +### BaseAPI +The BaseAPI class provides the foundation for interacting with the DigitalOcean API. It handles authentication, request construction, and response processing. It is used by the Manager class to perform the actual API calls. +- **Related Classes/Methods**: `digitalocean.baseapi.BaseAPI` (51:276), `digitalocean.baseapi.BaseAPI:__init__` (59:74), `digitalocean.baseapi.BaseAPI:__perform_request` (86:152), `digitalocean.baseapi.BaseAPI:__deal_with_pagination` (154:177), `digitalocean.baseapi.BaseAPI:get_data` (219:267) \ No newline at end of file diff --git a/CodeBoarding/SSHKeyResource.md b/CodeBoarding/SSHKeyResource.md new file mode 100644 index 0000000..5649beb --- /dev/null +++ b/CodeBoarding/SSHKeyResource.md @@ -0,0 +1,19 @@ +```mermaid +graph LR + SSHKey["SSHKey"] + Manager["Manager"] + Manager -- "Manages SSH Keys" --> SSHKey +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The DigitalOcean SSH Key Management subsystem allows users to manage SSH keys on their DigitalOcean account. It provides functionality to create, retrieve, update, and delete SSH keys. The core components involved are the SSHKey resource, which represents an individual SSH key, and the Manager, which provides methods for retrieving SSH keys. These components interact with the DigitalOcean API to perform the requested operations. + +### SSHKey +Represents an SSH Key in DigitalOcean. It allows for creation, retrieval, updating, and deletion of SSH keys. It interacts with the DigitalOcean API to perform these operations. +- **Related Classes/Methods**: `digitalocean.SSHKey.SSHKey` (5:98), `digitalocean.SSHKey.SSHKey:__init__` (6:12), `digitalocean.SSHKey.SSHKey:get_object` (15:21), `digitalocean.SSHKey.SSHKey:load` (23:42), `digitalocean.SSHKey.SSHKey:load_by_pub_key` (44:57), `digitalocean.SSHKey.SSHKey:create` (59:71), `digitalocean.SSHKey.SSHKey:edit` (73:89), `digitalocean.SSHKey.SSHKey:destroy` (91:95) + +### Manager +The Manager class provides methods for retrieving SSH keys. Specifically, it can retrieve all SSH keys or a single SSH key by its ID. It interacts with the DigitalOcean API to fetch this information. +- **Related Classes/Methods**: `digitalocean.Manager.Manager` (30:481), `digitalocean.Manager.Manager:get_all_sshkeys` (208:218), `digitalocean.Manager.Manager:get_ssh_key` (220:224) \ No newline at end of file diff --git a/CodeBoarding/StorageResource.md b/CodeBoarding/StorageResource.md new file mode 100644 index 0000000..00d4ae8 --- /dev/null +++ b/CodeBoarding/StorageResource.md @@ -0,0 +1,27 @@ +```mermaid +graph LR + Snapshot["Snapshot"] + Volume["Volume"] + Manager["Manager"] + Manager -- "manages" --> Snapshot + Manager -- "manages" --> Volume + Volume -- "creates snapshots" --> Snapshot + Volume -- "creates volume from" --> Snapshot +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The DigitalOcean storage management subsystem provides functionalities for managing storage resources like Volumes and Snapshots. It allows users to create, destroy, attach, detach, resize volumes, and create snapshots. The Manager component acts as a central point for retrieving and managing these storage resources, interacting with the DigitalOcean API to perform these actions. + +### Snapshot +Represents a snapshot object in DigitalOcean. It allows initializing, loading snapshot data, destroying snapshots, and retrieving the object's information. Snapshots can be created from volumes and used to create new volumes. +- **Related Classes/Methods**: `digitalocean.Snapshot.Snapshot:__init__` (6:16), `digitalocean.Snapshot.Snapshot:get_object` (19:25), `digitalocean.Snapshot.Snapshot:load` (27:35), `digitalocean.Snapshot.Snapshot:destroy` (37:41) + +### Volume +Represents a volume object in DigitalOcean. It provides functionalities to create, destroy, attach, detach, resize volumes, create snapshots from volumes, and retrieve snapshots associated with a volume. Volumes are the primary storage units and can be attached to droplets. +- **Related Classes/Methods**: `digitalocean.Volume.Volume:__init__` (6:19), `digitalocean.Volume.Volume:get_object` (22:28), `digitalocean.Volume.Volume:load` (30:38), `digitalocean.Volume.Volume:create` (40:75), `digitalocean.Volume.Volume:create_from_snapshot` (77:113), `digitalocean.Volume.Volume:destroy` (115:119), `digitalocean.Volume.Volume:attach` (121:135), `digitalocean.Volume.Volume:detach` (137:151), `digitalocean.Volume.Volume:resize` (153:167), `digitalocean.Volume.Volume:snapshot` (169:180), `digitalocean.Volume.Volume:get_snapshots` (182:195) + +### Manager +The Manager class is responsible for managing snapshots and volumes. It provides methods to retrieve individual snapshots and volumes, as well as lists of all snapshots, droplet snapshots, volume snapshots, and all volumes. It acts as a central point for interacting with the DigitalOcean API to manage storage resources. +- **Related Classes/Methods**: `digitalocean.Manager.Manager:get_snapshot` (309:315), `digitalocean.Manager.Manager:get_all_snapshots` (317:325), `digitalocean.Manager.Manager:get_droplet_snapshots` (327:335), `digitalocean.Manager.Manager:get_volume_snapshots` (337:345), `digitalocean.Manager.Manager:get_all_volumes` (347:371), `digitalocean.Manager.Manager:get_volume` (373:377) \ No newline at end of file diff --git a/CodeBoarding/VPCResource.md b/CodeBoarding/VPCResource.md new file mode 100644 index 0000000..a4a6127 --- /dev/null +++ b/CodeBoarding/VPCResource.md @@ -0,0 +1,20 @@ +```mermaid +graph LR + VPC["VPC"] + Manager["Manager"] + Manager -- "retrieves a VPC object" --> VPC + Manager -- "retrieves all VPC objects" --> VPC +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The DigitalOcean VPC management subsystem allows users to create, retrieve, update, and delete Virtual Private Clouds (VPCs). The core components involved are the VPC resource, which represents a VPC and provides methods for interacting with the DigitalOcean API, and the Manager, which provides higher-level functions for listing and retrieving VPCs. The VPC resource encapsulates the attributes and operations associated with a VPC, while the Manager simplifies the process of interacting with multiple VPCs. + +### VPC +Represents a DigitalOcean Virtual Private Cloud. It provides methods for creating, retrieving, updating, and deleting VPCs. It encapsulates the attributes and operations associated with a VPC. +- **Related Classes/Methods**: `digitalocean.VPC.VPC` (5:134), `digitalocean.VPC.VPC:__init__` (31:41), `digitalocean.VPC.VPC:get_object` (44:50), `digitalocean.VPC.VPC:load` (52:64), `digitalocean.VPC.VPC:create` (66:89), `digitalocean.VPC.VPC:rename` (91:107), `digitalocean.VPC.VPC:destroy` (127:131) + +### Manager +Provides methods for interacting with DigitalOcean resources, including VPCs. It allows listing and retrieving VPC objects. +- **Related Classes/Methods**: `digitalocean.Manager.Manager` (30:481), `digitalocean.Manager.Manager:get_vpc` (408:414), `digitalocean.Manager.Manager:get_all_vpcs` (416:427) \ No newline at end of file diff --git a/CodeBoarding/on_boarding.md b/CodeBoarding/on_boarding.md new file mode 100644 index 0000000..d34b889 --- /dev/null +++ b/CodeBoarding/on_boarding.md @@ -0,0 +1,80 @@ +```mermaid +graph LR + ResourceManager["ResourceManager"] + ComputeResource["ComputeResource"] + NetworkResource["NetworkResource"] + StorageResource["StorageResource"] + ImageResource["ImageResource"] + AccountResource["AccountResource"] + SSHKeyResource["SSHKeyResource"] + VPCResource["VPCResource"] + ProjectResource["ProjectResource"] + CDNResource["CDNResource"] + ResourceManager -- "manages" --> ComputeResource + ResourceManager -- "manages" --> NetworkResource + ResourceManager -- "manages" --> StorageResource + ResourceManager -- "manages" --> ImageResource + ResourceManager -- "manages" --> AccountResource + ResourceManager -- "manages" --> SSHKeyResource + ResourceManager -- "manages" --> VPCResource + ResourceManager -- "manages" --> ProjectResource + ResourceManager -- "manages" --> CDNResource + ComputeResource -- "uses" --> ImageResource + ComputeResource -- "uses" --> SSHKeyResource + ComputeResource -- "uses" --> StorageResource + click ResourceManager href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-digitalocean/ResourceManager.md" "Details" + click ComputeResource href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-digitalocean/ComputeResource.md" "Details" + click NetworkResource href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-digitalocean/NetworkResource.md" "Details" + click StorageResource href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-digitalocean/StorageResource.md" "Details" + click ImageResource href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-digitalocean/ImageResource.md" "Details" + click AccountResource href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-digitalocean/AccountResource.md" "Details" + click SSHKeyResource href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-digitalocean/SSHKeyResource.md" "Details" + click VPCResource href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-digitalocean/VPCResource.md" "Details" + click ProjectResource href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-digitalocean/ProjectResource.md" "Details" + click CDNResource href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-digitalocean/CDNResource.md" "Details" +``` +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20codeboarding@gmail.com-lightgrey?style=flat-square)](mailto:codeboarding@gmail.com) + +## Component Details + +The python-digitalocean library provides a Python interface to the DigitalOcean API. It allows users to manage DigitalOcean resources such as droplets, domains, images, and load balancers programmatically. The library handles authentication, request construction, and response processing, providing a high-level abstraction over the DigitalOcean API. The core functionality revolves around managing various cloud resources through a central manager, which interacts with resource-specific components. + +### ResourceManager +The ResourceManager component serves as the central point of interaction with the DigitalOcean API. It handles authentication, request construction, and response processing. It provides methods to retrieve, create, update, and delete various resources such as droplets, images, domains, and load balancers. It orchestrates the retrieval of data and delegates operations to other resource-specific components. +- **Related Classes/Methods**: `digitalocean.Manager.Manager` (30:481), `digitalocean.baseapi.BaseAPI` (51:276) + +### ComputeResource +The ComputeResource component represents a DigitalOcean Droplet (virtual server). It provides methods for creating, destroying, and managing Droplets, including actions like power on/off, reboot, resize, snapshot, and backups. It interacts with the ResourceManager to perform these actions. +- **Related Classes/Methods**: `digitalocean.Droplet.Droplet` (25:661) + +### NetworkResource +The NetworkResource component represents DigitalOcean networking resources such as Domains, Records, Floating IPs, Load Balancers, and Firewalls. It provides methods for managing these resources, including creating, updating, and deleting them. It interacts with the ResourceManager to perform these actions. +- **Related Classes/Methods**: `digitalocean.Domain.Domain` (6:172), `digitalocean.Record.Record` (5:126), `digitalocean.FloatingIP.FloatingIP` (5:112), `digitalocean.LoadBalancer.LoadBalancer` (85:380), `digitalocean.Firewall.Firewall` (104:303) + +### StorageResource +The StorageResource component represents DigitalOcean storage resources such as Volumes and Snapshots. It provides methods for managing these resources, including creating, destroying, attaching, detaching, resizing, and snapshotting. It interacts with the ResourceManager to perform these actions. +- **Related Classes/Methods**: `digitalocean.Volume.Volume` (5:199), `digitalocean.Snapshot.Snapshot` (5:44) + +### ImageResource +The ImageResource component represents a DigitalOcean image (snapshot or distribution). It provides methods for managing images, including creating, destroying, transferring, and renaming images. It interacts with the ResourceManager to perform these actions. +- **Related Classes/Methods**: `digitalocean.Image.Image` (5:162) + +### AccountResource +The AccountResource component represents a DigitalOcean Account and Balance. It provides methods for retrieving account and balance information. It interacts with the ResourceManager to perform these actions. +- **Related Classes/Methods**: `digitalocean.Account.Account` (5:35), `digitalocean.Balance.Balance` (5:31) + +### SSHKeyResource +The SSHKeyResource component represents a DigitalOcean SSH key. It provides methods for managing SSH keys, including creating, retrieving, updating, and deleting SSH keys. It interacts with the ResourceManager to perform these actions. +- **Related Classes/Methods**: `digitalocean.SSHKey.SSHKey` (5:98) + +### VPCResource +The VPC Resource component represents a DigitalOcean VPC. It provides methods for managing VPCs, including creating, retrieving, updating, and deleting VPCs. It interacts with the ResourceManager to perform these actions. +- **Related Classes/Methods**: `digitalocean.VPC.VPC` (5:134) + +### ProjectResource +The ProjectResource component represents a DigitalOcean Project. It provides methods for managing Projects, including creating, retrieving, updating, deleting, and assigning resources to projects. It interacts with the ResourceManager to perform these actions. +- **Related Classes/Methods**: `digitalocean.Project.Project` (4:144) + +### CDNResource +The CDNResource component represents a DigitalOcean CDN Endpoint. It provides methods for managing CDN Endpoints, including creating, retrieving, updating, and deleting CDN Endpoints. It interacts with the ResourceManager to perform these actions. +- **Related Classes/Methods**: `digitalocean.CDNEndpoint.CDNEndpoint` (5:102) \ No newline at end of file