-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02ab7c3
commit 509a27e
Showing
130 changed files
with
29,690 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
def get_client(): | ||
configuration = client.Configuration() | ||
key, err = config.get_api_key() | ||
|
||
if err != None: | ||
return None, err | ||
|
||
configuration.api_key['Authorization'] = key | ||
# configuration.debug = True | ||
configuration.api_key_prefix['Authorization'] = 'Bearer' | ||
configuration.host = "https://rest.compute.cudo.org" | ||
|
||
sclient = client.ApiClient(configuration) | ||
vms_api_client = client.VirtualMachinesApi(sclient) | ||
return vms_api_client, None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from helpers import config | ||
|
||
print(config.get_api_key()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# coding: utf-8 | ||
|
||
# flake8: noqa | ||
|
||
""" | ||
Cudo Compute service | ||
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 | ||
OpenAPI spec version: 1.0.0 | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
""" | ||
|
||
|
||
from __future__ import absolute_import | ||
|
||
# import apis into sdk package | ||
from src.cudo_compute.api.api_keys_api import APIKeysApi | ||
from src.cudo_compute.api.disks_api import DisksApi | ||
from src.cudo_compute.api.networks_api import NetworksApi | ||
from src.cudo_compute.api.object_storage_api import ObjectStorageApi | ||
from src.cudo_compute.api.permissions_api import PermissionsApi | ||
from src.cudo_compute.api.projects_api import ProjectsApi | ||
from src.cudo_compute.api.ssh_keys_api import SSHKeysApi | ||
from src.cudo_compute.api.search_api import SearchApi | ||
from src.cudo_compute.api.user_api import UserApi | ||
from src.cudo_compute.api.virtual_machines_api import VirtualMachinesApi | ||
|
||
# import ApiClient | ||
from src.cudo_compute.api_client import ApiClient | ||
from src.cudo_compute.configuration import Configuration | ||
# import models into sdk package | ||
from src.cudo_compute.models.any import Any | ||
from src.cudo_compute.models.api_key import ApiKey | ||
from src.cudo_compute.models.attach_storage_disk_response import AttachStorageDiskResponse | ||
from src.cudo_compute.models.body import Body | ||
from src.cudo_compute.models.body1 import Body1 | ||
from src.cudo_compute.models.body10 import Body10 | ||
from src.cudo_compute.models.body11 import Body11 | ||
from src.cudo_compute.models.body2 import Body2 | ||
from src.cudo_compute.models.body3 import Body3 | ||
from src.cudo_compute.models.body4 import Body4 | ||
from src.cudo_compute.models.body5 import Body5 | ||
from src.cudo_compute.models.body6 import Body6 | ||
from src.cudo_compute.models.body7 import Body7 | ||
from src.cudo_compute.models.body8 import Body8 | ||
from src.cudo_compute.models.body9 import Body9 | ||
from src.cudo_compute.models.connect_vm_response import ConnectVMResponse | ||
from src.cudo_compute.models.count_vms_response import CountVMsResponse | ||
from src.cudo_compute.models.cpu_model_category import CpuModelCategory | ||
from src.cudo_compute.models.create_disk_snapshot_response import CreateDiskSnapshotResponse | ||
from src.cudo_compute.models.create_network_response import CreateNetworkResponse | ||
from src.cudo_compute.models.create_private_vm_image_response import CreatePrivateVMImageResponse | ||
from src.cudo_compute.models.create_security_group_response import CreateSecurityGroupResponse | ||
from src.cudo_compute.models.create_storage_disk_response import CreateStorageDiskResponse | ||
from src.cudo_compute.models.create_vm_request_nic import CreateVMRequestNIC | ||
from src.cudo_compute.models.create_vm_response import CreateVMResponse | ||
from src.cudo_compute.models.data_center_category import DataCenterCategory | ||
from src.cudo_compute.models.decimal import Decimal | ||
from src.cudo_compute.models.delete_disk_snapshot_response import DeleteDiskSnapshotResponse | ||
from src.cudo_compute.models.delete_network_response import DeleteNetworkResponse | ||
from src.cudo_compute.models.delete_object_storage_key_response import DeleteObjectStorageKeyResponse | ||
from src.cudo_compute.models.delete_object_storage_user_response import DeleteObjectStorageUserResponse | ||
from src.cudo_compute.models.delete_private_vm_image_response import DeletePrivateVMImageResponse | ||
from src.cudo_compute.models.delete_security_group_response import DeleteSecurityGroupResponse | ||
from src.cudo_compute.models.delete_storage_disk_response import DeleteStorageDiskResponse | ||
from src.cudo_compute.models.detach_storage_disk_response import DetachStorageDiskResponse | ||
from src.cudo_compute.models.disk import Disk | ||
from src.cudo_compute.models.disk_state import DiskState | ||
from src.cudo_compute.models.disk_storage_class import DiskStorageClass | ||
from src.cudo_compute.models.disk_storage_price_hr import DiskStoragePriceHr | ||
from src.cudo_compute.models.disk_type import DiskType | ||
from src.cudo_compute.models.generate_api_key_request import GenerateApiKeyRequest | ||
from src.cudo_compute.models.get_disk_response import GetDiskResponse | ||
from src.cudo_compute.models.get_network_response import GetNetworkResponse | ||
from src.cudo_compute.models.get_object_storage_session_key_response import GetObjectStorageSessionKeyResponse | ||
from src.cudo_compute.models.get_private_vm_image_response import GetPrivateVMImageResponse | ||
from src.cudo_compute.models.get_security_group_response import GetSecurityGroupResponse | ||
from src.cudo_compute.models.get_vm_response import GetVMResponse | ||
from src.cudo_compute.models.gpu_model_category import GpuModelCategory | ||
from src.cudo_compute.models.host_config_category import HostConfigCategory | ||
from src.cudo_compute.models.identity_verification_session import IdentityVerificationSession | ||
from src.cudo_compute.models.image import Image | ||
from src.cudo_compute.models.list_api_keys_response import ListApiKeysResponse | ||
from src.cudo_compute.models.list_disk_snapshots_response import ListDiskSnapshotsResponse | ||
from src.cudo_compute.models.list_disks_response import ListDisksResponse | ||
from src.cudo_compute.models.list_networks_response import ListNetworksResponse | ||
from src.cudo_compute.models.list_object_storage_buckets_response import ListObjectStorageBucketsResponse | ||
from src.cudo_compute.models.list_object_storage_keys_response import ListObjectStorageKeysResponse | ||
from src.cudo_compute.models.list_object_storage_users_response import ListObjectStorageUsersResponse | ||
from src.cudo_compute.models.list_private_vm_images_response import ListPrivateVMImagesResponse | ||
from src.cudo_compute.models.list_private_vm_images_response_private_image import ListPrivateVMImagesResponsePrivateImage | ||
from src.cudo_compute.models.list_project_ssh_keys_response import ListProjectSshKeysResponse | ||
from src.cudo_compute.models.list_projects_response import ListProjectsResponse | ||
from src.cudo_compute.models.list_public_vm_images_response import ListPublicVMImagesResponse | ||
from src.cudo_compute.models.list_regions_response import ListRegionsResponse | ||
from src.cudo_compute.models.list_security_groups_response import ListSecurityGroupsResponse | ||
from src.cudo_compute.models.list_ssh_keys_response import ListSshKeysResponse | ||
from src.cudo_compute.models.list_user_permissions_response import ListUserPermissionsResponse | ||
from src.cudo_compute.models.list_vm_data_centers_response import ListVMDataCentersResponse | ||
from src.cudo_compute.models.list_vm_disks_response import ListVMDisksResponse | ||
from src.cudo_compute.models.list_vm_machine_types_request import ListVMMachineTypesRequest | ||
from src.cudo_compute.models.list_vm_machine_types_response import ListVMMachineTypesResponse | ||
from src.cudo_compute.models.list_vms_response import ListVMsResponse | ||
from src.cudo_compute.models.monitor_vm_response import MonitorVMResponse | ||
from src.cudo_compute.models.network import Network | ||
from src.cudo_compute.models.network_price_hr import NetworkPriceHr | ||
from src.cudo_compute.models.object_storage_bucket import ObjectStorageBucket | ||
from src.cudo_compute.models.object_storage_key import ObjectStorageKey | ||
from src.cudo_compute.models.object_storage_user import ObjectStorageUser | ||
from src.cudo_compute.models.profile import Profile | ||
from src.cudo_compute.models.project import Project | ||
from src.cudo_compute.models.protocol import Protocol | ||
from src.cudo_compute.models.reboot_vm_response import RebootVMResponse | ||
from src.cudo_compute.models.region import Region | ||
from src.cudo_compute.models.resize_vm_disk_response import ResizeVMDiskResponse | ||
from src.cudo_compute.models.resize_vm_response import ResizeVMResponse | ||
from src.cudo_compute.models.revert_disk_response import RevertDiskResponse | ||
from src.cudo_compute.models.role import Role | ||
from src.cudo_compute.models.rule import Rule | ||
from src.cudo_compute.models.rule_type import RuleType | ||
from src.cudo_compute.models.security_group import SecurityGroup | ||
from src.cudo_compute.models.security_group1 import SecurityGroup1 | ||
from src.cudo_compute.models.security_group_rule import SecurityGroupRule | ||
from src.cudo_compute.models.snapshot import Snapshot | ||
from src.cudo_compute.models.ssh_key import SshKey | ||
from src.cudo_compute.models.ssh_key_source import SshKeySource | ||
from src.cudo_compute.models.start_network_response import StartNetworkResponse | ||
from src.cudo_compute.models.start_vm_response import StartVMResponse | ||
from src.cudo_compute.models.status import Status | ||
from src.cudo_compute.models.stop_network_response import StopNetworkResponse | ||
from src.cudo_compute.models.stop_vm_response import StopVMResponse | ||
from src.cudo_compute.models.terminate_vm_response import TerminateVMResponse | ||
from src.cudo_compute.models.update_private_vm_image_response import UpdatePrivateVMImageResponse | ||
from src.cudo_compute.models.update_security_group_response import UpdateSecurityGroupResponse | ||
from src.cudo_compute.models.user_permission import UserPermission | ||
from src.cudo_compute.models.v1_private_image import V1PrivateImage | ||
from src.cudo_compute.models.vm import VM | ||
from src.cudo_compute.models.vm_data_center import VMDataCenter | ||
from src.cudo_compute.models.vm_data_center_storage_class import VMDataCenterStorageClass | ||
from src.cudo_compute.models.vm_monitoring_item import VMMonitoringItem | ||
from src.cudo_compute.models.vmnic import VMNIC | ||
from src.cudo_compute.models.v_router_size import VRouterSize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from __future__ import absolute_import | ||
|
||
# flake8: noqa | ||
|
||
# import apis into api package | ||
from src.cudo_compute.api.api_keys_api import APIKeysApi | ||
from src.cudo_compute.api.disks_api import DisksApi | ||
from src.cudo_compute.api.networks_api import NetworksApi | ||
from src.cudo_compute.api.object_storage_api import ObjectStorageApi | ||
from src.cudo_compute.api.permissions_api import PermissionsApi | ||
from src.cudo_compute.api.projects_api import ProjectsApi | ||
from src.cudo_compute.api.ssh_keys_api import SSHKeysApi | ||
from src.cudo_compute.api.search_api import SearchApi | ||
from src.cudo_compute.api.user_api import UserApi | ||
from src.cudo_compute.api.virtual_machines_api import VirtualMachinesApi |
Oops, something went wrong.