class ImportBootImages(amp.Command): """Import boot images and report the final boot images that exist on the cluster. :since: 1.7 """ arguments = [ ( b"sources", AmpList([ (b"url", amp.Unicode()), (b"keyring_data", Bytes()), ( b"selections", AmpList([ (b"os", amp.Unicode()), (b"release", amp.Unicode()), (b"arches", amp.ListOf(amp.Unicode())), (b"subarches", amp.ListOf(amp.Unicode())), (b"labels", amp.ListOf(amp.Unicode())), ]), ), ]), ), (b"http_proxy", ParsedURL(optional=True)), (b"https_proxy", ParsedURL(optional=True)), ] response = [] errors = []
class GetArchiveMirrors(amp.Command): """Return the Main and Port mirrors to use. :since: 1.7 """ arguments = [] response = [(b"main", ParsedURL()), (b"ports", ParsedURL())] errors = []
class GetProxies(amp.Command): """Return the HTTP and HTTPS proxies to use. :since: 1.6 """ arguments = [] response = [ (b"http", ParsedURL(optional=True)), (b"https", ParsedURL(optional=True)), ] errors = []
class RegisterRackController(amp.Command): """Register a rack controller with the region controller. This is the second step of the Authenticate, Register, Commission process. :since: 2.0 """ arguments = [ (b"system_id", amp.Unicode(optional=True)), (b"hostname", amp.Unicode()), (b"interfaces", StructureAsJSON()), # The URL for the region as seen by the rack controller. (b"url", ParsedURL(optional=True)), # The old nodegroup UUID. (b"nodegroup_uuid", amp.Unicode(optional=True)), (b"beacon_support", amp.Boolean(optional=True)), (b"version", amp.Unicode(optional=True)), ] response = [ (b"system_id", amp.Unicode()), (b"beacon_support", amp.Boolean(optional=True)), (b"version", amp.Unicode(optional=True)), ] errors = { CannotRegisterRackController: b"CannotRegisterRackController", }
class GetPreseedData(amp.Command): """Get OS-specific preseed data. :since: 1.7 """ arguments = [ (b"osystem", amp.Unicode()), (b"preseed_type", amp.Unicode()), (b"node_system_id", amp.Unicode()), (b"node_hostname", amp.Unicode()), (b"consumer_key", amp.Unicode()), (b"token_key", amp.Unicode()), (b"token_secret", amp.Unicode()), (b"metadata_url", ParsedURL()), ] response = [ (b"data", StructureAsJSON()), ] errors = { exceptions.NoSuchOperatingSystem: ( b"NoSuchOperatingSystem"), NotImplementedError: ( b"NotImplementedError"), }
class SendPodCommissioningResults(amp.Command): """Send commissioning results from the Pod. :since: 2.8 """ arguments = [ (b"pod_id", amp.Integer()), (b"name", amp.Unicode()), (b"type", amp.Unicode()), (b"system_id", amp.Unicode()), (b"context", StructureAsJSON()), (b"consumer_key", amp.Unicode()), (b"token_key", amp.Unicode()), (b"token_secret", amp.Unicode()), (b"metadata_url", ParsedURL()), ] errors = { exceptions.UnknownPodType: b"UnknownPodType", NotImplementedError: b"NotImplementedError", exceptions.PodActionFail: b"PodActionFail", }