{"id":28477874,"url":"https://github.com/fog/fog-packet","last_synced_at":"2025-07-02T18:31:57.229Z","repository":{"id":56847359,"uuid":"123035640","full_name":"fog/fog-packet","owner":"fog","description":"Fog for Packet","archived":false,"fork":false,"pushed_at":"2018-09-04T12:04:31.000Z","size":154,"stargazers_count":2,"open_issues_count":8,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-07T17:10:20.184Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.packet.net/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-26T21:52:25.000Z","updated_at":"2020-12-21T16:58:06.000Z","dependencies_parsed_at":"2022-08-30T20:21:11.586Z","dependency_job_id":null,"html_url":"https://github.com/fog/fog-packet","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fog/fog-packet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fog%2Ffog-packet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fog%2Ffog-packet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fog%2Ffog-packet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fog%2Ffog-packet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fog","download_url":"https://codeload.github.com/fog/fog-packet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fog%2Ffog-packet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263193730,"owners_count":23428569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-07T17:08:49.568Z","updated_at":"2025-07-02T18:31:57.221Z","avatar_url":"https://github.com/fog.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fog-packet\n\n![Gem Version](https://badge.fury.io/rb/fog-packet.svg)\n[![Build Status](https://travis-ci.org/fog/fog-packet.svg?branch=master)](https://travis-ci.org/fog/fog-packet)\n\n## Table of Contents\n\n* [Packet Provider for Fog](#packet-provider-for-fog)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Build](#build)\n* [Authentication](#authentication)\n* [Operations](#operations)\n  * [Servers](#servers)\n  * [Volumes](#volumes)\n  * [Snapshots](#snapshots)\n  * [IP Addresses](#ip-addresses)\n  * [Projects](#projects)\n  * [Plans](#plans)\n  * [Facilities](#facilities)\n  * [Users](#users)\n  * [Emails](#emails)\n  * [VPN](#vpn)\n  * [Spot Market Prices](#spot-market-prices)\n  * [SSH Keys](#ssh-keys)\n  * [Batches](#batches)\n  * [BGP Sessions](#bgp-sessions)\n  * [Two Factor Authentication](#two-factor-authentication)\n  * [Sessions](#sessions)\n  * [Notifications](#notifications)\n  * [Invitations](#invitations)\n  * [UserVerificationTokens](#userverificationtokens)\n  * [Licenses](#licenses)\n  * [Memberships](#memberships)\n  * [Capacity](#capacity)\n  * [Payment Methods](#payment-methods)\n  * [Project Transfer Requests](#project-transfer-requests)\n  * [Hardware Reservations](#hardware-reservations)\n* [Unit Tests](#unit-tests)\n* [Support](#support)\n\n# Packet Provider for Fog\n\n[Packet](https://www.packet.net/) provides an API drive-driven bare metal platform that brings the price and performance benefits of bare metal servers and network to the cloud.\n\n[Fog](https://fog.io/) is a Ruby library that provides a consistent framework for interacting with the various cloud providers and their services. The Packet provider for Fog adds powerful bare metal to the growing list of cloud services.\n\n# Requirements \n\n1. [Ruby](https://www.ruby-lang.org/) version 2.2 and above.\n\n# Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'fog-packet'\n```\n\nAnd then execute:\n\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n\n```bash\n$ gem install fog-packet\n```\n\n# Build\n\nIn some cases it might be necessary to manually build the package from source:\n\n1. Clone the repository:\n\n```bash\n$ git clone https://github.com/fog/fog-packet\n```\n\n2. Change into the repository root and build the gem package:\n\n```bash\n$ cd fog-packet\n$ gem build fog-packet.gemspec\n```\n\n3. Install the Ruby gem:\n\n```bash\n$ gem install fog-packet-1.1.0.gem\n```\n\n# Authentication \n\nProvide your credentials when creating a compute object:\n\n```ruby\nrequire 'fog-packet'\n\ncompute = Fog::Compute::Packet.new(packet_token: 'PACKET_TOKEN')\n```  \n\nAlternatively, the Packet token can be supplied as an environment variable:\n\n    $ export PACKET_TOKEN=\"PACKET_TOKEN\"\n\n```ruby\nrequire 'fog-packet'\n\ncompute = Fog::Compute::Packet.new()\n```\n\n# Operations\n\n## Servers\n\n## Create a server\n\nCreates a new server and provisions it in our datacenter. \n\ndevice = compute.devices.create(:project_id =\u003e project_id, :facility =\u003e \"ewr1\", :plan =\u003e \"baremetal_0\", :hostname =\u003e \"test01\", :operating_system =\u003e \"coreos_stable\", :user_ssh_keys =\u003e [\"ssh_key_id\"])\n\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| project_id | string | \tProject UUID  under which server will be created| Yes |\n| hostname | string | The hostname of the server. | Yes |\n| plan | string | Plan name| Yes |\n| facility | string | Facility code | Yes |\n| operating_system | string || No |\n| description | string | | No* |\n| billing_cycle | string | | No |\n| always_pxe | string | | No |\n| ipxe_script_url | string | | No |\n| userdata | string | | No |\n| locked | string | | No |\n| hardware_reservation_id | string | | No |\n| spot_instance | string | | No |\n| spot_price_max | string | | No |\n| termination_time | string | | No |\n| tags | string | | No |\n| project_ssh_keys | collection of strings | | No |\n| user_ssh_keys | collection of strings | | No |\n| features | string | | No |\n\n## Retrieve a server\n\nGets details about a specified server\n\n```ruby\nresponse = compute.servers.get(server_id)\n```\n\n## Update a server\nUpdates a server\n```ruby\nserver.hostname= 'test02'\n\nresponse = server.update\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| hostname | string | The hostname of the server. | Yes |\n| description | string | | No |\n| billing_cycle | string | | No |\n| always_pxe | string | | No |\n| ipxe_script_url | string | | No |\n| userdata | string | | No |\n| locked | string | | No |\n| spot_instance | string | | No |\n\n## Reboot a server\nReboots the specified server\n\n```ruby\nresponse = server.reboot\n```\n\n## Power off server\nPowers off the specified server\n\n```ruby\nresponse = server.stop\n```\n\n## Power on server\nPowers on the specified server\n\n```ruby\nresponse = server.start\n```\n\n## Delete a server\n\nDeletes the specified servers\n\n```ruby\nresponse = server.destroy\n```\n\n## Get Server Events\nReturns a list of events pertaining to a specific server.\n\n```ruby\nevents = compute.events.all(server_id)\n```\n## Get Server Bandwidth\nRetrieve an instance bandwidth for a given period of time.\n\n```ruby\nbandwidth = compute.bandwidth.get(server_id, \"2018-03-10\", \"2018-04-10\")\n```\n\n## Volumes\n\n## Create a volume\nCreates a new volume\n\n```ruby\nvolume = compute.volumes.create(:project_id =\u003e project_id, :facility =\u003e \"ewr1\", :plan =\u003e \"storage_1\", :size =\u003e 20, :description =\u003e \"test description\", :billing_cycle =\u003e \"hourly\")\n```\n\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| facility | string | Facility code | Yes |\n| plan | string | Plan name| Yes |\n| size | int | Volume size| Yes |\n| description | string | | No |\n| billing_cycle | string | | No |\n| snapshot_policies | string | | No |\n\n\n## Retrieve a volume\n\nGets a specified volume\n\n```ruby\nresponse = compute.volumes.get(volume_id)\n```\n\n## List volumes\nList all volumes in the specified project\n\n```ruby\nresponse = compute.volumes.all(project_id)\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Attach a volume\n\nAttaches a volume to the specified server\n\n```ruby\nresponse = volume.attach(server_id)\n```\n\n## Detach a volume\n\nDetaches a volume from the specified server\n\n```ruby\nresponse = volume.detach\n```\n\n## Delete a volume\nDeletes a specified volume\n\n```ruby\nresponse = volume.destroy\n```\n\n## Snapshots\n\n## Create a snapshot of a volume\nCreates a snapshot of the specified volume\n\n```ruby\nresponse = compute.snapshots.create(:storage_id =\u003e volume_id)\n```\n\n## List snapshots\nList all snapshots of the specified volume\n\n```ruby\nresponse = compute.snapshots.all(volume_id)\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n\n## Delete a snapshot\nDeletes the specified snapshot\n```ruby\nresponse = snapshot.destroy\n```     \n\n## IP addresses\n\n## Reserve an IP address\nReserve an IP address\n\n```ruby\nresponse = compute.ips.create(:project_id =\u003e project_id, :facility =\u003e \"ewr1\", :quantity =\u003e 2, :type =\u003e \"global_ipv4\", :comments =\u003e \"test comment\")\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| facility | string | Facility code | Yes |\n| quantity | int|  | Yes |\n| type | string |  | Yes |\n| comments | string |  | No |\n\n## Get IPs\nRetrives the list of IP addresses under the specified project\n\n```ruby\nresponse = compute.ips.all(project_id)\n```\n\nOptional parameters\n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Assign an IP address\nAssigns an IP address to the specified servers\n\n```ruby\nresponse = ip.assign(server_id)\n```\n\n## Unassign IP address\nUnassigns the specified IP address\n \n```ruby\nresponse = compute.unassign\n```\n\n## Projects\n\n## Create a project\n\nCreates a new project\n\n```ruby\nresponse = compute.projects.create(:name =\u003e \"test01\", :payment_method_id =\u003e \"1234\")\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| name | string | \tName of the project| Yes |\n| payment_method_id | string |  | No |\n\n\n## Retrieve a project\n\nGets project details\n\n```ruby\nresponse = compute.projects.get(project_id)\n\n```\n\n## Plans\n\n## List plans\nList all available plans of the account\n\n```ruby\nresponse = compute.plans.all\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Facilities\n\n## List facilities\nList all available facilities of the account\n\n```ruby\nresponse = compute.facilities.all\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Users\n\n## List Users\nList all users in the current user’s projects\n\n```ruby\nresponse = compute.users.all\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Retrieve a user\n\nRetrieve the currently logged-in user or retrieve a user by user ID.\n\n```ruby\nresponse = compute.users.get\n```\n            \n```ruby\nresponse = compute.users.get(user_id)\n```\n\n## Update a user\n\nUpdates user information.\n\n```ruby\nuser.first_name = \"Jane\"\nuser.last_name = \"Doe\"\n\nresponse = user.update\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| first_name | string | First name| |\n| last_name | string | Last name |  |\n| phone_number | string |  Phone number|  |\n| time_zone | string | Time zone of the user|  |\n| password | string |  |  |\n| avatar | string |  |  |\n\n## Emails\n\n## Create an email\n\nAdd a new email address to the current user.\n\n```ruby\nemail = compute.emails.create(:address =\u003e \"jdoe@example.net\", :default =\u003e false)\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| address | string | Email address | |\n| default | boolean | Indicates if email address is default or not |  |\n\n## Retrieve an email\nProvides one of the user’s emails.\n\n```ruby\nresponse = compute.emails.get(email_id)\n```\n\n## Update an email\n\nUpdates the email.\n\n```ruby\nemail.default = false\nemail.update\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| address | string | Email address | |\n| default | boolean | Indicates if email address is default or not |  |\n\n## Delete an email\n\nDeletes the email.\n\n```ruby\nresponse = email.destroy\n```\n\nNote: Default email cannot be deleted.\n\n## VPN\n\n## Enable VPN\nTurns on vpn for the currently logged-in user.\n\n```ruby\nresponse = compute.vpns.enable\n```\n\n## Disable VPN\nTurns off vpn for the currently logged-in user.\n\n```ruby\nresponse = compute.vpns.disable\n```\n## Retrieve VPN\nReturns the client vpn config for the currently logged-in user.\n\n```ruby\nresponse = compute.vpns.get(\"nrt1\")\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| facility_code | string | facility code (ewr1, scj1, arm1, nrt1) | Yes |\n\n\n## Spot Market Prices\n\n## Get spot market prices\n\nGet Packet current spot market prices.\n\n```ruby\nresponse = compute.spot_market_prices.all\n```\n\n## Spot Market History\n\nGet spot market prices for a given plan and facility in a fixed period of time.\n\n```ruby\nresponse = compute.spot_market_prices.get(\"ewr1\", \"baremetal_0\")\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| facility_code | string | facility code (ewr1, scj1, arm1, nrt1) | Yes |\n| plan | string | plan code | Yes |\n\n## SSH Keys\n\n## Create a SSH Key\n\nCreates a SSH Key\n\n```ruby\nresponse = compute.ssh_keys.create(:label =\u003e \"test\", :key =\u003e \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDgnV5MOhBqpQLt66KGlMKi...\")\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| label | string | Label for the SSH key | Yes |\n| key | string | Public SSH Key | Yes |\n\n## List SSH Keys\n\nReturns a collection of the current **user** SSH keys. The UUIDs are used with the device.create `user_ssh_keys` property.\n\n```ruby\nresponse = compute.ssh_keys.all\n```\n\nThe following example returns a collection of the **project** SSH keys. These UUIDs are used with the device.create `project_ssh_keys` property.\n\n```ruby\nresponse = compute.ssh_keys.all(project_id)\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Retrieve a SSH key\n\nReturns a single ssh key\n\n```ruby\nresponse = compute.ssh_keys.get(key_id)\n```\n\n## Update a SSH Key\n\n```ruby\nsshkey.label = \"test_jg_01\"\nsshkey.key = \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDgnV5MOhBqpQLt66KGlMKi...\"\n\nresponse = sshkey.update\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| label | string | Label for the SSH key | Yes |\n| key | string | Public SSH Key | Yes |\n\n## Delete a SSH Key\n\nDeletes the ssh key.\n\n```ruby\nresponse = sshkey.destroy\n```    \n\n## Batches\n\n## Create a batch\nCreates a new batch of instances.\n\n```ruby\nbatches = [{\n    :hostname =\u003e \"test1\",\n    :description =\u003e \"test batch\",\n    :plan =\u003e \"baremetal_0\",\n    :operating_system =\u003e \"coreos_stable\",\n    :facility =\u003e \"ewr1\",\n    :billing_cycle =\u003e \"hourly\",\n    :tags =\u003e [\"abc\"],\n    :quantity =\u003e 1\n}]\n\nresponse = compute.batches.create(project_id, :batches =\u003e batches)\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| batches | collection | Collection of instances. | Yes |\n| project_id | string | UUID of the project | Yes |\n\n## List batches\nReturns all batches for the given project.\n\n```ruby\nresponse = compute.batches.all(project_id)\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Retrieve a batch\nReturns a batch\n\n```ruby\nresponse = compute.batches.get(batch_id)\n```\n\n## BGP Sessions\n\n## Create a BGP Session\nCreates a BGP session.\n\n```ruby\nresponse = compute.bgp_sessions.create(:device_id =\u003e server_id, :address_family =\u003e address_family)\n```\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| device_id | string | UUID of a server | Yes |\n| address_family | string | Either 'ipv4' or 'ipv6' | Yes |\n\n## List BGP sessions\nProvides a listing of available BGP sessions for the server.\n\n```ruby\nresponse = compute.bgp_sessions.all(server_id)\n```\n\n## Retrieve a BGP session\nReturns a BGP session.\n\n```ruby\nresponse = compute.bgp_sessions.get(session_id)\n```\n\n## Delete a BGP session\nDeletes the BGP session\n\n```ruby\nresponse = session.destroy\n```\n\n## Two Factor Authentication\n\n## Enable two factor authentication\nEnables two factor authentication using authenticator app.\n\n```ruby\ncompute.two_factor_auth.enable(type)\n```\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| type | string | Two factor auth types include authenticator app or sms.  | Yes |\n\n## Disable two factor authentication\nDisables two factor authentication.\n\n```ruby\ncompute.two_factor_auth.disable(type)\n```\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| type | string | Two factor auth types include authenticator app or sms.  | Yes |\n\n## Sessions\n\n## Session Login\nLog in\n\n```ruby\ncompute.sessions.login(:username =\u003e \"username\",:password =\u003e \"password\")\n```\n\n## List Sessions\nReturns all session tokens for the current user.\n\n```ruby\nsessions = compute.sessions.all\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Delete session\nDestroy users current session unless sessions_id is provided.\n\n```ruby\ncompute.sessions.destroy(sessions_id)\n```\n\n## Notifications\n\n## List notifications\nReturns a collection of the current user’s notification.\n\n```ruby\ncompute.notifications.all\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Retrieve a notification\nReturns a single notification if the user has access.\n\n```ruby\ncompute.notifications.get(notification_id)\n```\n\n## Update a notification\nUpdates a single notification. Currently, the only supported operation is marking a notification as read.\n\n```ruby\nnotification.update\n```\n\n## Invitations\n\n## List Invitations\nReturns all invitations in a project.\n\n```ruby\ncompute.invitations.all(project_id)\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Retrieve an invite\nReturns a single invitation.\n\n```ruby\ninvite = compute.invitations.get(invite_id)\n```\n\n## Accept invitation\nAccept an invitation.\n\n```ruby\ninvite.accept\n```\n\n## Decline invitation\nDecline an invitation.\n\n```ruby\ninvite.decline\n```\n\n## UserVerificationTokens\n\n## Request email verification \nCreates an email verification request.\n\n```ruby\ncompute.email_verification.request(email)\n```\n\n## Verify email\nConsumes an email verification token and verifies the user associated with it.\n\n```ruby\ncompute.email_verification.verify(token)\n```\n\n## Licenses\n\n## Create a License\nCreates a new license for the given project.\n\n```ruby\nlicense = {\n  :project_id =\u003e project_id, \n  :description =\u003e \"test01\", \n  :size =\u003e 1,\n  :license_product_id =\u003e \"license_product_id\"\n}\n\nlicense = compute.licenses.create(license)\n```\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| project_id | string | UUID of the project | Yes |\n| description | string | | Yes |\n| size | string | | Yes |\n| license_product_id | string | | Yes |\n\n## List Project Licenses\nProvides a collection of licenses for a given project.\n\n```ruby\ncompute.licenses.all(project_id)\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Retrieve a License\nReturns a license.\n\n```ruby\nlicense = compute.licenses.get(license_id)\n```\n\n## Memberships\n\n## List Memberships\nReturns all memberships in a project.\n\n```ruby\nmemberships = compute.memberships.all(project_id)\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Retrieve a membership\nReturns a single membership.\n\n```ruby\nmembership = compute.memberships.get(membership_id)\n```\n\n## Update a membership\nUpdates the membership.\n\n```ruby\nmembership.roles = [\"owner\"]\nmembership.update\n```\n## Delete a membership\nDeletes the membership.\n\n```ruby\nmembership.destroy\n```\n## Organizations\n\n## Create an organization\nCreates an organization.\n\n```ruby\noptions = {\n  :name =\u003e \"test_org\",\n  :description =\u003e \"test organization\"\n}\n\nresponse = compute.organizations.create(options)\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| name | string | Name for the organization | Yes |\n| description | string | | No |\n| website | string | | No |\n| twitter | string | | No |\n| logo | string | | No |\n| address | string | | No |\n| customdata | string | | No |\n\n## Update an organization\nUpdates the organization.\n\n```ruby\norg.name = \"new name\"\norg.description = \"new organization\"\n\nresponse = org.update\n```\n\n## Retrieve an organization\nReturns a single organization's details, if the user is authorized to view it.\n\n```ruby\norg = compute.organizations.get(org_id)\n```\n\n## List organizations\nReturns a list of organizations that are accessible to the current user.\n\n```ruby\nresponse = compute.organizations.all\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| personal | string |  | \n| without_projects | string | | \n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n\n## Delete an organization\nDeletes the organization.\n\n```ruby\nresponse = org.destroy\n```\n\n## Capacity\n\n## Get capacity\nReturns a list of facilities and plans with their current capacity.\n\n```ruby \nresponse = compute.capacities.all\n```\n\n## Validate required capacity\nValidates if a deploy can be fulfilled. \n\n```ruby\noptions = {\n  :servers =\u003e [\n    {\n      :facility =\u003e \"ewr1\",\n      :plan =\u003e \"baremetal_2a\",\n      :quantity =\u003e 1\n    },\n    {\n      :facility =\u003e \"atl1\",\n      :plan =\u003e \"baremetal_1e\",\n      :quantity =\u003e 1\n    }\n  ]\n}\n\nresponse = compute.capacities.validate(options)\n```\n\nIf required capacities are available function will return true otherwise it will return an error with details.\n\n## Payment methods\n\n## Create a payment method\nCreates a payment method.\n\n```ruby\noptions = {\n    :name =\u003e \"test\",\n    :default =\u003e \"false\",\n    :nonce =\u003e \"12\",\n    :organization_id =\u003e \"ef114acb-2e50-43b5-83e7-b7c2758f0520\"\n}\n\nresponse = compute.payment_methods.create(options)\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| organization_id | string |  | Yes |\n| name | string |  | Yes |\n| nonce | string | | Yes |\n| default | boolean | | No |\n\n\n## List payment methods \nReturns all payment methods of an organization.\n\n```ruby\npayment_methods = compute.payment_methods.all(org_id)\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Retrieve a payment method\nReturns a payment method.\n\n```ruby\npayment_method = compute.payment_methods.get(payment_method_id)\n```\n\n## Update payment method\nUpdates the payment method.\n\n```ruby\npayment_method.name = \"new name\"\npayment_method.expiration_month = 12\npayment_method.expiration_year = 2022\nresponse = payment_method.update\n```\n\n## Delete payment method\nDeletes the payment method.\n\n```ruby\nresponse = payment_method.destroy\n```\n\n## Project transfer requests\n\n## Transfer a project\nOrganization owners can transfer their projects to other organizations.\n\n```ruby\nresponse = compute.transfer_requests.transfer(project_id, org_id)\n```\n\nAvailable parameters\n\n| NAME| TYPE | DESCRIPTION | REQUIRED |\n|---|---|---|---|\n| project_id | string | UUID of the project to be transfered  | Yes |\n| org_id | string | UUID of the target organization  | Yes |\n\n## List transfer requests\nProvides a collection of project transfer requests from or to the organization.\n\n```ruby\nresponse = compute.transfer_requests.all(org_id)\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Retrieve a transfer request\nReturns a single transfer request.\n\n```ruby\ntransfer_request = compute.transfer_requests.get(transfer_request_id)\n```\n\n## Accept a transfer request\nAccept a transfer request.\n\n```ruby\nresponse = transfer_request.accept\n```\n\n## Decline a transfer request\nDecline a transfer request.\n\n```ruby\nresponse = transfer_request.decline\n```\n\n## Hardware reservations\n\n## List hardware reservations\nProvides a collection of hardware reservations for a given project.\n\n```ruby\nhardware_reservations = compute.hardware_reservations.all(project_id)\n```\n\nOptional parameters \n\n| NAME| TYPE | DESCRIPTION | \n|---|---|---|\n| per_page | string | | \n| page | string | | \n| include | string | For resources that contain collections of other resources, the Packet API will return links to the other resources by default. | \n\n## Retrieve a hardware reservation\nReturns a single hardware reservation.\n\n```ruby\nhardware_reservation = @compute.hardware_reservations.get(reservation_id)\n```\n\n## Move a hardware reservation\nMove a hardware reservation to another project.\n\n```ruby\nhardware_reservation.move(project_id) \n```\n\n# Unit Tests\n\nRun mock tests:\n\n```bash\nFOG_MOCK=true rake test\n```\n\nRun real tests:\n\n```bash\nFOG_MOCK=false rake test\n```\n\n# Support\n\nFor help with this package:\n\n* Open up a GitHub issue [here](https://github.com/fog/fog-packet/issues).\n* Contact the [Packet Community Slack](http://slack.packet.net) or on Freenode IRC in the #packethost channel.\n* Search the [Packet Help Center](http://help.packet.net/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffog%2Ffog-packet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffog%2Ffog-packet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffog%2Ffog-packet/lists"}