scaleway.baremetal.v3 package

Submodules

scaleway.baremetal.v3.api module

class scaleway.baremetal.v3.api.BaremetalV3PrivateNetworkAPI(client: Client, *, bypass_validation: bool = False)

Bases: API

Elastic Metal - Private Networks API.

add_server_private_network(*, server_id: str, private_network_id: str, zone: Optional[str] = None, ipam_ip_ids: Optional[List[str]] = None) ServerPrivateNetwork

Add a server to a Private Network. Add an Elastic Metal server to a Private Network. :param server_id: UUID of the server. :param private_network_id: UUID of the Private Network. :param zone: Zone to target. If none is passed will use default zone from the config. :param ipam_ip_ids: IPAM IDs of an IPs to attach to the server. :return: ServerPrivateNetwork

Usage:

result = api.add_server_private_network(
    server_id="example",
    private_network_id="example",
)
delete_server_private_network(*, server_id: str, private_network_id: str, zone: Optional[str] = None) None

Delete a Private Network. :param server_id: UUID of the server. :param private_network_id: UUID of the Private Network. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_server_private_network(
    server_id="example",
    private_network_id="example",
)
list_server_private_networks(*, zone: Optional[str] = None, order_by: Optional[ListServerPrivateNetworksRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, server_id: Optional[str] = None, private_network_id: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, ipam_ip_ids: Optional[List[str]] = None) ListServerPrivateNetworksResponse

List the Private Networks of a server. List the Private Networks of an Elastic Metal server. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order for the returned Private Networks. :param page: Page number for the returned Private Networks. :param page_size: Maximum number of Private Networks per page. :param server_id: Filter Private Networks by server UUID. :param private_network_id: Filter Private Networks by Private Network UUID. :param organization_id: Filter Private Networks by organization UUID. :param project_id: Filter Private Networks by project UUID. :param ipam_ip_ids: Filter Private Networks by IPAM IP UUIDs. :return: ListServerPrivateNetworksResponse

Usage:

result = api.list_server_private_networks()
list_server_private_networks_all(*, zone: Optional[str] = None, order_by: Optional[ListServerPrivateNetworksRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, server_id: Optional[str] = None, private_network_id: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, ipam_ip_ids: Optional[List[str]] = None) List[ServerPrivateNetwork]

List the Private Networks of a server. List the Private Networks of an Elastic Metal server. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order for the returned Private Networks. :param page: Page number for the returned Private Networks. :param page_size: Maximum number of Private Networks per page. :param server_id: Filter Private Networks by server UUID. :param private_network_id: Filter Private Networks by Private Network UUID. :param organization_id: Filter Private Networks by organization UUID. :param project_id: Filter Private Networks by project UUID. :param ipam_ip_ids: Filter Private Networks by IPAM IP UUIDs. :return: List[ServerPrivateNetwork]

Usage:

result = api.list_server_private_networks_all()
set_server_private_networks(*, server_id: str, per_private_network_ipam_ip_ids: Dict[str, List[str]], zone: Optional[str] = None) SetServerPrivateNetworksResponse

Set multiple Private Networks on a server. Configure multiple Private Networks on an Elastic Metal server. :param server_id: UUID of the server. :param per_private_network_ipam_ip_ids: Object where the keys are the UUIDs of Private Networks and the values are arrays of IPAM IDs representing the IPs to assign to this Elastic Metal server on the Private Network. If the array supplied for a Private Network is empty, the next available IP from the Private Network’s CIDR block will automatically be used for attachment. :param zone: Zone to target. If none is passed will use default zone from the config. :return: SetServerPrivateNetworksResponse

Usage:

result = api.set_server_private_networks(
    server_id="example",
    per_private_network_ipam_ip_ids={},
)

scaleway.baremetal.v3.content module

scaleway.baremetal.v3.content.SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: List[ServerPrivateNetworkStatus] = [<ServerPrivateNetworkStatus.ATTACHING: 'attaching'>, <ServerPrivateNetworkStatus.DETACHING: 'detaching'>]

Lists transient statutes of the enum ServerPrivateNetworkStatus.

scaleway.baremetal.v3.marshalling module

scaleway.baremetal.v3.marshalling.marshal_PrivateNetworkApiAddServerPrivateNetworkRequest(request: PrivateNetworkApiAddServerPrivateNetworkRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.baremetal.v3.marshalling.marshal_PrivateNetworkApiSetServerPrivateNetworksRequest(request: PrivateNetworkApiSetServerPrivateNetworksRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.baremetal.v3.marshalling.unmarshal_ListServerPrivateNetworksResponse(data: Any) ListServerPrivateNetworksResponse
scaleway.baremetal.v3.marshalling.unmarshal_ServerPrivateNetwork(data: Any) ServerPrivateNetwork
scaleway.baremetal.v3.marshalling.unmarshal_SetServerPrivateNetworksResponse(data: Any) SetServerPrivateNetworksResponse

scaleway.baremetal.v3.types module

class scaleway.baremetal.v3.types.ListServerPrivateNetworksRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.baremetal.v3.types.ListServerPrivateNetworksResponse(server_private_networks: 'List[ServerPrivateNetwork]', total_count: 'int')

Bases: object

server_private_networks: List[ServerPrivateNetwork]
total_count: int
class scaleway.baremetal.v3.types.PrivateNetworkApiAddServerPrivateNetworkRequest(server_id: 'str', private_network_id: 'str', zone: 'Optional[Zone]', ipam_ip_ids: 'Optional[List[str]]')

Bases: object

ipam_ip_ids: Optional[List[str]]

IPAM IDs of an IPs to attach to the server.

private_network_id: str

UUID of the Private Network.

server_id: str

UUID of the server.

zone: Optional[str]

Zone to target. If none is passed will use default zone from the config.

class scaleway.baremetal.v3.types.PrivateNetworkApiDeleteServerPrivateNetworkRequest(server_id: 'str', private_network_id: 'str', zone: 'Optional[Zone]')

Bases: object

private_network_id: str

UUID of the Private Network.

server_id: str

UUID of the server.

zone: Optional[str]

Zone to target. If none is passed will use default zone from the config.

class scaleway.baremetal.v3.types.PrivateNetworkApiListServerPrivateNetworksRequest(zone: 'Optional[Zone]', order_by: 'Optional[ListServerPrivateNetworksRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', server_id: 'Optional[str]', private_network_id: 'Optional[str]', organization_id: 'Optional[str]', project_id: 'Optional[str]', ipam_ip_ids: 'Optional[List[str]]')

Bases: object

ipam_ip_ids: Optional[List[str]]

Filter Private Networks by IPAM IP UUIDs.

order_by: Optional[ListServerPrivateNetworksRequestOrderBy]

Sort order for the returned Private Networks.

organization_id: Optional[str]

Filter Private Networks by organization UUID.

page: Optional[int]

Page number for the returned Private Networks.

page_size: Optional[int]

Maximum number of Private Networks per page.

private_network_id: Optional[str]

Filter Private Networks by Private Network UUID.

project_id: Optional[str]

Filter Private Networks by project UUID.

server_id: Optional[str]

Filter Private Networks by server UUID.

zone: Optional[str]

Zone to target. If none is passed will use default zone from the config.

class scaleway.baremetal.v3.types.PrivateNetworkApiSetServerPrivateNetworksRequest(server_id: 'str', per_private_network_ipam_ip_ids: 'Dict[str, List[str]]', zone: 'Optional[Zone]')

Bases: object

per_private_network_ipam_ip_ids: Dict[str, List[str]]

Object where the keys are the UUIDs of Private Networks and the values are arrays of IPAM IDs representing the IPs to assign to this Elastic Metal server on the Private Network. If the array supplied for a Private Network is empty, the next available IP from the Private Network’s CIDR block will automatically be used for attachment.

server_id: str

UUID of the server.

zone: Optional[str]

Zone to target. If none is passed will use default zone from the config.

class scaleway.baremetal.v3.types.ServerPrivateNetwork(id: 'str', project_id: 'str', server_id: 'str', private_network_id: 'str', status: 'ServerPrivateNetworkStatus', ipam_ip_ids: 'List[str]', vlan: 'Optional[int]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Private Network creation date.

id: str

UUID of the Server-to-Private Network mapping.

ipam_ip_ids: List[str]

IPAM IP IDs of the server, if it has any.

private_network_id: str

Private Network UUID.

project_id: str

Private Network Project UUID.

server_id: str

Server UUID.

status: ServerPrivateNetworkStatus

Configuration status of the Private Network.

updated_at: Optional[datetime]

Date the Private Network was last modified.

vlan: Optional[int]

VLAN UUID associated with the Private Network.

class scaleway.baremetal.v3.types.ServerPrivateNetworkStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ATTACHED = 'attached'
ATTACHING = 'attaching'
DETACHING = 'detaching'
ERROR = 'error'
LOCKED = 'locked'
UNKNOWN_STATUS = 'unknown_status'
class scaleway.baremetal.v3.types.SetServerPrivateNetworksResponse(server_private_networks: 'List[ServerPrivateNetwork]')

Bases: object

server_private_networks: List[ServerPrivateNetwork]

Module contents

class scaleway.baremetal.v3.BaremetalV3PrivateNetworkAPI(client: Client, *, bypass_validation: bool = False)

Bases: API

Elastic Metal - Private Networks API.

add_server_private_network(*, server_id: str, private_network_id: str, zone: Optional[str] = None, ipam_ip_ids: Optional[List[str]] = None) ServerPrivateNetwork

Add a server to a Private Network. Add an Elastic Metal server to a Private Network. :param server_id: UUID of the server. :param private_network_id: UUID of the Private Network. :param zone: Zone to target. If none is passed will use default zone from the config. :param ipam_ip_ids: IPAM IDs of an IPs to attach to the server. :return: ServerPrivateNetwork

Usage:

result = api.add_server_private_network(
    server_id="example",
    private_network_id="example",
)
delete_server_private_network(*, server_id: str, private_network_id: str, zone: Optional[str] = None) None

Delete a Private Network. :param server_id: UUID of the server. :param private_network_id: UUID of the Private Network. :param zone: Zone to target. If none is passed will use default zone from the config.

Usage:

result = api.delete_server_private_network(
    server_id="example",
    private_network_id="example",
)
list_server_private_networks(*, zone: Optional[str] = None, order_by: Optional[ListServerPrivateNetworksRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, server_id: Optional[str] = None, private_network_id: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, ipam_ip_ids: Optional[List[str]] = None) ListServerPrivateNetworksResponse

List the Private Networks of a server. List the Private Networks of an Elastic Metal server. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order for the returned Private Networks. :param page: Page number for the returned Private Networks. :param page_size: Maximum number of Private Networks per page. :param server_id: Filter Private Networks by server UUID. :param private_network_id: Filter Private Networks by Private Network UUID. :param organization_id: Filter Private Networks by organization UUID. :param project_id: Filter Private Networks by project UUID. :param ipam_ip_ids: Filter Private Networks by IPAM IP UUIDs. :return: ListServerPrivateNetworksResponse

Usage:

result = api.list_server_private_networks()
list_server_private_networks_all(*, zone: Optional[str] = None, order_by: Optional[ListServerPrivateNetworksRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, server_id: Optional[str] = None, private_network_id: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, ipam_ip_ids: Optional[List[str]] = None) List[ServerPrivateNetwork]

List the Private Networks of a server. List the Private Networks of an Elastic Metal server. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Sort order for the returned Private Networks. :param page: Page number for the returned Private Networks. :param page_size: Maximum number of Private Networks per page. :param server_id: Filter Private Networks by server UUID. :param private_network_id: Filter Private Networks by Private Network UUID. :param organization_id: Filter Private Networks by organization UUID. :param project_id: Filter Private Networks by project UUID. :param ipam_ip_ids: Filter Private Networks by IPAM IP UUIDs. :return: List[ServerPrivateNetwork]

Usage:

result = api.list_server_private_networks_all()
set_server_private_networks(*, server_id: str, per_private_network_ipam_ip_ids: Dict[str, List[str]], zone: Optional[str] = None) SetServerPrivateNetworksResponse

Set multiple Private Networks on a server. Configure multiple Private Networks on an Elastic Metal server. :param server_id: UUID of the server. :param per_private_network_ipam_ip_ids: Object where the keys are the UUIDs of Private Networks and the values are arrays of IPAM IDs representing the IPs to assign to this Elastic Metal server on the Private Network. If the array supplied for a Private Network is empty, the next available IP from the Private Network’s CIDR block will automatically be used for attachment. :param zone: Zone to target. If none is passed will use default zone from the config. :return: SetServerPrivateNetworksResponse

Usage:

result = api.set_server_private_networks(
    server_id="example",
    per_private_network_ipam_ip_ids={},
)
class scaleway.baremetal.v3.ListServerPrivateNetworksRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.baremetal.v3.ListServerPrivateNetworksResponse(server_private_networks: 'List[ServerPrivateNetwork]', total_count: 'int')

Bases: object

server_private_networks: List[ServerPrivateNetwork]
total_count: int
class scaleway.baremetal.v3.PrivateNetworkApiAddServerPrivateNetworkRequest(server_id: 'str', private_network_id: 'str', zone: 'Optional[Zone]', ipam_ip_ids: 'Optional[List[str]]')

Bases: object

ipam_ip_ids: Optional[List[str]]

IPAM IDs of an IPs to attach to the server.

private_network_id: str

UUID of the Private Network.

server_id: str

UUID of the server.

zone: Optional[str]

Zone to target. If none is passed will use default zone from the config.

class scaleway.baremetal.v3.PrivateNetworkApiDeleteServerPrivateNetworkRequest(server_id: 'str', private_network_id: 'str', zone: 'Optional[Zone]')

Bases: object

private_network_id: str

UUID of the Private Network.

server_id: str

UUID of the server.

zone: Optional[str]

Zone to target. If none is passed will use default zone from the config.

class scaleway.baremetal.v3.PrivateNetworkApiListServerPrivateNetworksRequest(zone: 'Optional[Zone]', order_by: 'Optional[ListServerPrivateNetworksRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', server_id: 'Optional[str]', private_network_id: 'Optional[str]', organization_id: 'Optional[str]', project_id: 'Optional[str]', ipam_ip_ids: 'Optional[List[str]]')

Bases: object

ipam_ip_ids: Optional[List[str]]

Filter Private Networks by IPAM IP UUIDs.

order_by: Optional[ListServerPrivateNetworksRequestOrderBy]

Sort order for the returned Private Networks.

organization_id: Optional[str]

Filter Private Networks by organization UUID.

page: Optional[int]

Page number for the returned Private Networks.

page_size: Optional[int]

Maximum number of Private Networks per page.

private_network_id: Optional[str]

Filter Private Networks by Private Network UUID.

project_id: Optional[str]

Filter Private Networks by project UUID.

server_id: Optional[str]

Filter Private Networks by server UUID.

zone: Optional[str]

Zone to target. If none is passed will use default zone from the config.

class scaleway.baremetal.v3.PrivateNetworkApiSetServerPrivateNetworksRequest(server_id: 'str', per_private_network_ipam_ip_ids: 'Dict[str, List[str]]', zone: 'Optional[Zone]')

Bases: object

per_private_network_ipam_ip_ids: Dict[str, List[str]]

Object where the keys are the UUIDs of Private Networks and the values are arrays of IPAM IDs representing the IPs to assign to this Elastic Metal server on the Private Network. If the array supplied for a Private Network is empty, the next available IP from the Private Network’s CIDR block will automatically be used for attachment.

server_id: str

UUID of the server.

zone: Optional[str]

Zone to target. If none is passed will use default zone from the config.

class scaleway.baremetal.v3.ServerPrivateNetwork(id: 'str', project_id: 'str', server_id: 'str', private_network_id: 'str', status: 'ServerPrivateNetworkStatus', ipam_ip_ids: 'List[str]', vlan: 'Optional[int]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Private Network creation date.

id: str

UUID of the Server-to-Private Network mapping.

ipam_ip_ids: List[str]

IPAM IP IDs of the server, if it has any.

private_network_id: str

Private Network UUID.

project_id: str

Private Network Project UUID.

server_id: str

Server UUID.

status: ServerPrivateNetworkStatus

Configuration status of the Private Network.

updated_at: Optional[datetime]

Date the Private Network was last modified.

vlan: Optional[int]

VLAN UUID associated with the Private Network.

class scaleway.baremetal.v3.ServerPrivateNetworkStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ATTACHED = 'attached'
ATTACHING = 'attaching'
DETACHING = 'detaching'
ERROR = 'error'
LOCKED = 'locked'
UNKNOWN_STATUS = 'unknown_status'
class scaleway.baremetal.v3.SetServerPrivateNetworksResponse(server_private_networks: 'List[ServerPrivateNetwork]')

Bases: object

server_private_networks: List[ServerPrivateNetwork]