jubilant.statustypes

Dataclasses that contain parsed output from juju status --format=json.

class jubilant.statustypes.AppStatus(
charm: 'str',
charm_origin: 'str',
charm_name: 'str',
charm_rev: 'int',
exposed: 'bool',
base: 'FormattedBase | None' = None,
charm_channel: 'str' = '',
charm_version: 'str' = '',
charm_profile: 'str' = '',
can_upgrade_to: 'str' = '',
scale: 'int' = 0,
provider_id: 'str' = '',
address: 'str' = '',
life: 'str' = '',
app_status: 'StatusInfo' = <factory>,
relations: 'dict[str,
list[AppStatusRelation]]' = <factory>,
subordinate_to: 'list[str]' = <factory>,
units: 'dict[str,
UnitStatus]' = <factory>,
version: 'str' = '',
endpoint_bindings: 'dict[str,
str]' = <factory>,
)

Bases: object

address: str = ''
app_status: StatusInfo
base: FormattedBase | None = None
can_upgrade_to: str = ''
charm: str
charm_channel: str = ''
charm_name: str
charm_origin: str
charm_profile: str = ''
charm_rev: int
charm_version: str = ''
endpoint_bindings: dict[str, str]
exposed: bool
property is_active: bool

Report whether the application status for this app is “active”.

property is_blocked: bool

Report whether the application status for this app is “blocked”.

property is_error: bool

Report whether the application status for this app is “error”.

property is_maintenance: bool

Report whether the application status for this app is “maintenance”.

property is_waiting: bool

Report whether the application status for this app is “waiting”.

life: str = ''
provider_id: str = ''
relations: dict[str, list[AppStatusRelation]]
scale: int = 0
subordinate_to: list[str]
units: dict[str, UnitStatus]
version: str = ''
class jubilant.statustypes.AppStatusRelation(
related_app: 'str' = '',
interface: 'str' = '',
scope: 'str' = '',
)

Bases: object

interface: str = ''
related_app: str = ''
scope: str = ''
class jubilant.statustypes.CombinedStorage(
storage: 'dict[str,
StorageInfo]' = <factory>,
filesystems: 'dict[str,
FilesystemInfo]' = <factory>,
volumes: 'dict[str,
VolumeInfo]' = <factory>,
)

Bases: object

filesystems: dict[str, FilesystemInfo]
storage: dict[str, StorageInfo]
volumes: dict[str, VolumeInfo]
class jubilant.statustypes.ControllerStatus(timestamp: 'str' = '')

Bases: object

timestamp: str = ''
class jubilant.statustypes.EntityStatus(current: 'str' = '', message: 'str' = '', since: 'str' = '')

Bases: object

current: str = ''
message: str = ''
since: str = ''
class jubilant.statustypes.FilesystemAttachment(mount_point: 'str', read_only: 'bool', life: 'str' = '')

Bases: object

life: str = ''
mount_point: str
read_only: bool
class jubilant.statustypes.FilesystemAttachments(
machines: 'dict[str,
FilesystemAttachment]' = <factory>,
containers: 'dict[str,
FilesystemAttachment]' = <factory>,
units: 'dict[str,
UnitStorageAttachment]' = <factory>,
)

Bases: object

containers: dict[str, FilesystemAttachment]
machines: dict[str, FilesystemAttachment]
units: dict[str, UnitStorageAttachment]
class jubilant.statustypes.FilesystemInfo(
size: 'int',
provider_id: 'str' = '',
volume: 'str' = '',
storage: 'str' = '',
attachments: 'FilesystemAttachments' = <factory>,
pool: 'str' = '',
life: 'str' = '',
status: 'EntityStatus' = <factory>,
)

Bases: object

attachments: FilesystemAttachments
life: str = ''
pool: str = ''
provider_id: str = ''
size: int
status: EntityStatus
storage: str = ''
volume: str = ''
class jubilant.statustypes.FormattedBase(name: 'str', channel: 'str')

Bases: object

channel: str
name: str
class jubilant.statustypes.LxdProfileContents(
config: 'dict[str, str]',
description: 'str',
devices: 'dict[str, dict[str, str]]',
)

Bases: object

config: dict[str, str]
description: str
devices: dict[str, dict[str, str]]
class jubilant.statustypes.MachineStatus(
juju_status: 'StatusInfo' = <factory>,
hostname: 'str' = '',
dns_name: 'str' = '',
ip_addresses: 'list[str]' = <factory>,
instance_id: 'str' = '',
display_name: 'str' = '',
machine_status: 'StatusInfo' = <factory>,
modification_status: 'StatusInfo' = <factory>,
base: 'FormattedBase | None' = None,
network_interfaces: 'dict[str,
NetworkInterface]' = <factory>,
containers: 'dict[str,
MachineStatus]' = <factory>,
constraints: 'str' = '',
hardware: 'str' = '',
controller_member_status: 'str' = '',
ha_primary: 'bool' = False,
lxd_profiles: 'dict[str,
LxdProfileContents]' = <factory>,
)

Bases: object

base: FormattedBase | None = None
constraints: str = ''
containers: dict[str, MachineStatus]
controller_member_status: str = ''
display_name: str = ''
dns_name: str = ''
ha_primary: bool = False
hardware: str = ''
hostname: str = ''
instance_id: str = ''
ip_addresses: list[str]
juju_status: StatusInfo
lxd_profiles: dict[str, LxdProfileContents]
machine_status: StatusInfo
modification_status: StatusInfo
network_interfaces: dict[str, NetworkInterface]
class jubilant.statustypes.ModelStatus(
name: 'str',
type: 'str',
controller: 'str',
cloud: 'str',
version: 'str',
region: 'str' = '',
upgrade_available: 'str' = '',
model_status: 'StatusInfo' = <factory>,
)

Bases: object

cloud: str
controller: str
model_status: StatusInfo
name: str
region: str = ''
type: str
upgrade_available: str = ''
version: str
class jubilant.statustypes.NetworkInterface(
ip_addresses: 'list[str]',
mac_address: 'str',
is_up: 'bool',
gateway: 'str' = '',
dns_nameservers: 'list[str]' = <factory>,
space: 'str' = '',
)

Bases: object

dns_nameservers: list[str]
gateway: str = ''
ip_addresses: list[str]
is_up: bool
mac_address: str
space: str = ''
class jubilant.statustypes.OfferStatus(
app: 'str',
endpoints: 'dict[str, RemoteEndpoint]',
charm: 'str' = '',
total_connected_count: 'int' = 0,
active_connected_count: 'int' = 0,
)

Bases: object

active_connected_count: int = 0
app: str
charm: str = ''
endpoints: dict[str, RemoteEndpoint]
total_connected_count: int = 0
class jubilant.statustypes.RemoteAppStatus(
url: 'str',
endpoints: 'dict[str,
RemoteEndpoint]' = <factory>,
life: 'str' = '',
app_status: 'StatusInfo' = <factory>,
relations: 'dict[str,
list[str]]' = <factory>,
)

Bases: object

app_status: StatusInfo
endpoints: dict[str, RemoteEndpoint]
life: str = ''
relations: dict[str, list[str]]
url: str
class jubilant.statustypes.RemoteEndpoint(interface: 'str', role: 'str')

Bases: object

interface: str
role: str
class jubilant.statustypes.Status(model: ~jubilant.statustypes.ModelStatus, machines: dict[str, ~jubilant.statustypes.MachineStatus], apps: dict[str, ~jubilant.statustypes.AppStatus], app_endpoints: dict[str, ~jubilant.statustypes.RemoteAppStatus] = <factory>, offers: dict[str, ~jubilant.statustypes.OfferStatus] = <factory>, storage: ~jubilant.statustypes.CombinedStorage = <factory>, controller: ~jubilant.statustypes.ControllerStatus = <factory>)

Bases: object

Parsed version of the status object returned by juju status --format=json.

app_endpoints: dict[str, RemoteAppStatus]
apps: dict[str, AppStatus]
controller: ControllerStatus
machines: dict[str, MachineStatus]
model: ModelStatus
offers: dict[str, OfferStatus]
storage: CombinedStorage
exception jubilant.statustypes.StatusError

Bases: Exception

Raised when juju status returns a status-error for certain types.

class jubilant.statustypes.StatusInfo(
current: 'str' = '',
message: 'str' = '',
reason: 'str' = '',
since: 'str' = '',
version: 'str' = '',
life: 'str' = '',
)

Bases: object

current: str = ''
life: str = ''
message: str = ''
reason: str = ''
since: str = ''
version: str = ''
class jubilant.statustypes.StorageAttachments(units: 'dict[str, UnitStorageAttachment]')

Bases: object

units: dict[str, UnitStorageAttachment]
class jubilant.statustypes.StorageInfo(
kind: 'str',
status: 'EntityStatus',
persistent: 'bool',
life: 'str' = '',
attachments: 'StorageAttachments | None' = None,
)

Bases: object

attachments: StorageAttachments | None = None
kind: str
life: str = ''
persistent: bool
status: EntityStatus
class jubilant.statustypes.UnitStatus(
workload_status: 'StatusInfo' = <factory>,
juju_status: 'StatusInfo' = <factory>,
leader: 'bool' = False,
upgrading_from: 'str' = '',
machine: 'str' = '',
open_ports: 'list[str]' = <factory>,
public_address: 'str' = '',
address: 'str' = '',
provider_id: 'str' = '',
subordinates: 'dict[str,
UnitStatus]' = <factory>,
)

Bases: object

address: str = ''
property is_active: bool

Report whether the workload status for this unit status is “active”.

property is_blocked: bool

Report whether the workload status for this unit status is “blocked”.

property is_error: bool

Report whether the workload status for this unit status is “error”.

property is_maintenance: bool

Report whether the workload status for this unit status is “maintenance”.

property is_waiting: bool

Report whether the workload status for this unit status is “waiting”.

juju_status: StatusInfo
leader: bool = False
machine: str = ''
open_ports: list[str]
provider_id: str = ''
public_address: str = ''
subordinates: dict[str, UnitStatus]
upgrading_from: str = ''
workload_status: StatusInfo
class jubilant.statustypes.UnitStorageAttachment(
machine: 'str' = '',
location: 'str' = '',
life: 'str' = '',
)

Bases: object

life: str = ''
location: str = ''
machine: str = ''
class jubilant.statustypes.VolumeAttachment(
read_only: 'bool',
device: 'str' = '',
device_link: 'str' = '',
bus_address: 'str' = '',
life: 'str' = '',
)

Bases: object

bus_address: str = ''
device: str = ''
life: str = ''
read_only: bool
class jubilant.statustypes.VolumeAttachments(
machines: 'dict[str,
VolumeAttachment]' = <factory>,
containers: 'dict[str,
VolumeAttachment]' = <factory>,
units: 'dict[str,
UnitStorageAttachment]' = <factory>,
)

Bases: object

containers: dict[str, VolumeAttachment]
machines: dict[str, VolumeAttachment]
units: dict[str, UnitStorageAttachment]
class jubilant.statustypes.VolumeInfo(
size: 'int',
persistent: 'bool',
provider_id: 'str' = '',
storage: 'str' = '',
attachments: 'VolumeAttachments' = <factory>,
pool: 'str' = '',
hardware_id: 'str' = '',
wwn: 'str' = '',
life: 'str' = '',
status: 'EntityStatus' = <factory>,
)

Bases: object

attachments: VolumeAttachments
hardware_id: str = ''
life: str = ''
persistent: bool
pool: str = ''
provider_id: str = ''
size: int
status: EntityStatus
storage: str = ''
wwn: str = ''