Documentation ¶
Overview ¶
Package keypairs provides the ability to manage key pairs as well as create bms with a specified key pair.
Example to List Key Pairs
listkeypair := keypairs.ListOpts{Name: "c2c-keypair1"} allkeypair, err := keypairs.List(client,listkeypair) if err != nil { panic(err) } fmt.Println(allkeypair)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyPair ¶
type KeyPair struct { // Name is used to refer to this keypair from other services within this // region. Name string `json:"name"` // Fingerprint is a short sequence of bytes that can be used to authenticate // or validate a longer public key. Fingerprint string `json:"fingerprint"` // PublicKey is the public key from this pair, in OpenSSH format. // "ssh-rsa AAAAB3Nz..." PublicKey string `json:"public_key"` }
KeyPair is an SSH key known to the OpenStack Cloud that is available to be injected into bms servers.
func ExtractKeyPairs ¶
func ExtractKeyPairs(r pagination.Page) ([]KeyPair, error)
ExtractKeyPairs interprets a page of results as a slice of KeyPairs.
func FilterKeyPairs ¶
FilterKeyPairs used to filter keypairs using name
type KeyPairPage ¶
type KeyPairPage struct {
pagination.LinkedPageBase
}
KeyPairPage stores a single page of all KeyPair results from a List call. Use the ExtractKeyPairs function to convert the results to a slice of KeyPairs.
func (KeyPairPage) IsEmpty ¶
func (page KeyPairPage) IsEmpty() (bool, error)
IsEmpty determines whether or not a KeyPairPage is empty.
Click to show internal directories.
Click to hide internal directories.