Regen schema to pick up missing APIs
authorCory Johns <johnsca@gmail.com>
Fri, 10 Mar 2017 18:08:28 +0000 (12:08 -0600)
committerCory Johns <johnsca@gmail.com>
Fri, 17 Mar 2017 22:51:35 +0000 (18:51 -0400)
Due to some portions of the API living in a different location in the
Juju source, they were missed.  The schema gen code has been factored
out into its own repo (https://github.com/juju/schemagen) and the
missing APIs fixed.

Makefile
juju/client/_client.py
juju/client/facade.py
juju/client/schemas.json

index ed9c3aa..ec716ec 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
 BIN := .tox/py35/bin
 PY := $(BIN)/python3.5
 PIP := $(BIN)/pip
+SCHEMAGEN := $(shell which schemagen)
 
 clean:
        find . -name __pycache__ -type d -exec rm -r {} +
@@ -11,6 +12,10 @@ clean:
        tox -r --notest
 
 client:
+ifndef SCHEMAGEN
+       $(error "schemagen is not available, please install from https://github.com/juju/schemagen")
+endif
+       schemagen > juju/client/schemas.json
        $(PY) -m juju.client.facade -s juju/client/schemas.json -o juju/client/_client.py
 
 test:
index 69fbc4c..0847da6 100644 (file)
@@ -942,58 +942,6 @@ class Value(Type):
         self.virt_type = virt_type
 
 
-class ApplicationRelationsChange(Type):
-    _toSchema = {'changed': 'changed', 'removed': 'removed'}
-    _toPy = {'changed': 'changed', 'removed': 'removed'}
-    def __init__(self, changed=None, removed=None):
-        '''
-        changed : typing.Sequence<+T_co>[~RelationChange]<~RelationChange>
-        removed : typing.Sequence<+T_co>[int]
-        '''
-        self.changed = [RelationChange.from_json(o) for o in changed or []]
-        self.removed = removed
-
-
-class ApplicationRelationsWatchResult(Type):
-    _toSchema = {'applicationrelationswatcherid': 'ApplicationRelationsWatcherId', 'changes': 'changes', 'error': 'error'}
-    _toPy = {'ApplicationRelationsWatcherId': 'applicationrelationswatcherid', 'changes': 'changes', 'error': 'error'}
-    def __init__(self, applicationrelationswatcherid=None, changes=None, error=None):
-        '''
-        applicationrelationswatcherid : str
-        changes : ApplicationRelationsChange
-        error : Error
-        '''
-        self.applicationrelationswatcherid = applicationrelationswatcherid
-        self.changes = ApplicationRelationsChange.from_json(changes) if changes else None
-        self.error = Error.from_json(error) if error else None
-
-
-class RelationChange(Type):
-    _toSchema = {'changedunits': 'changedunits', 'departedunits': 'departedunits', 'id_': 'id', 'life': 'life'}
-    _toPy = {'changedunits': 'changedunits', 'departedunits': 'departedunits', 'id': 'id_', 'life': 'life'}
-    def __init__(self, changedunits=None, departedunits=None, id_=None, life=None):
-        '''
-        changedunits : typing.Mapping<~KT, +VT_co>[str, ~RelationUnitChange]<~RelationUnitChange>
-        departedunits : typing.Sequence<+T_co>[str]
-        id_ : int
-        life : str
-        '''
-        self.changedunits = changedunits
-        self.departedunits = departedunits
-        self.id_ = id_
-        self.life = life
-
-
-class RelationUnitChange(Type):
-    _toSchema = {'settings': 'settings'}
-    _toPy = {'settings': 'settings'}
-    def __init__(self, settings=None):
-        '''
-        settings : typing.Mapping<~KT, +VT_co>[str, typing.Any]
-        '''
-        self.settings = settings
-
-
 class StringsWatchResult(Type):
     _toSchema = {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
     _toPy = {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
@@ -1815,11 +1763,12 @@ class MachineHardware(Type):
 
 
 class MachineStatus(Type):
-    _toSchema = {'agent_status': 'agent-status', 'containers': 'containers', 'dns_name': 'dns-name', 'hardware': 'hardware', 'has_vote': 'has-vote', 'id_': 'id', 'instance_id': 'instance-id', 'instance_status': 'instance-status', 'ip_addresses': 'ip-addresses', 'jobs': 'jobs', 'series': 'series', 'wants_vote': 'wants-vote'}
-    _toPy = {'agent-status': 'agent_status', 'containers': 'containers', 'dns-name': 'dns_name', 'hardware': 'hardware', 'has-vote': 'has_vote', 'id': 'id_', 'instance-id': 'instance_id', 'instance-status': 'instance_status', 'ip-addresses': 'ip_addresses', 'jobs': 'jobs', 'series': 'series', 'wants-vote': 'wants_vote'}
-    def __init__(self, agent_status=None, containers=None, dns_name=None, hardware=None, has_vote=None, id_=None, instance_id=None, instance_status=None, ip_addresses=None, jobs=None, series=None, wants_vote=None):
+    _toSchema = {'agent_status': 'agent-status', 'constraints': 'constraints', 'containers': 'containers', 'dns_name': 'dns-name', 'hardware': 'hardware', 'has_vote': 'has-vote', 'id_': 'id', 'instance_id': 'instance-id', 'instance_status': 'instance-status', 'ip_addresses': 'ip-addresses', 'jobs': 'jobs', 'series': 'series', 'wants_vote': 'wants-vote'}
+    _toPy = {'agent-status': 'agent_status', 'constraints': 'constraints', 'containers': 'containers', 'dns-name': 'dns_name', 'hardware': 'hardware', 'has-vote': 'has_vote', 'id': 'id_', 'instance-id': 'instance_id', 'instance-status': 'instance_status', 'ip-addresses': 'ip_addresses', 'jobs': 'jobs', 'series': 'series', 'wants-vote': 'wants_vote'}
+    def __init__(self, agent_status=None, constraints=None, containers=None, dns_name=None, hardware=None, has_vote=None, id_=None, instance_id=None, instance_status=None, ip_addresses=None, jobs=None, series=None, wants_vote=None):
         '''
         agent_status : DetailedStatus
+        constraints : str
         containers : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
         dns_name : str
         hardware : str
@@ -1833,6 +1782,7 @@ class MachineStatus(Type):
         wants_vote : bool
         '''
         self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None
+        self.constraints = constraints
         self.containers = containers
         self.dns_name = dns_name
         self.hardware = hardware
@@ -1869,9 +1819,9 @@ class ModelConfigResults(Type):
 
 
 class ModelInfo(Type):
-    _toSchema = {'cloud_credential_tag': 'cloud-credential-tag', 'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'controller_uuid': 'controller-uuid', 'default_series': 'default-series', 'life': 'life', 'machines': 'machines', 'name': 'name', 'owner_tag': 'owner-tag', 'provider_type': 'provider-type', 'status': 'status', 'users': 'users', 'uuid': 'uuid'}
-    _toPy = {'cloud-credential-tag': 'cloud_credential_tag', 'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'controller-uuid': 'controller_uuid', 'default-series': 'default_series', 'life': 'life', 'machines': 'machines', 'name': 'name', 'owner-tag': 'owner_tag', 'provider-type': 'provider_type', 'status': 'status', 'users': 'users', 'uuid': 'uuid'}
-    def __init__(self, cloud_credential_tag=None, cloud_region=None, cloud_tag=None, controller_uuid=None, default_series=None, life=None, machines=None, name=None, owner_tag=None, provider_type=None, status=None, users=None, uuid=None):
+    _toSchema = {'cloud_credential_tag': 'cloud-credential-tag', 'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'controller_uuid': 'controller-uuid', 'default_series': 'default-series', 'life': 'life', 'machines': 'machines', 'migration': 'migration', 'name': 'name', 'owner_tag': 'owner-tag', 'provider_type': 'provider-type', 'status': 'status', 'users': 'users', 'uuid': 'uuid'}
+    _toPy = {'cloud-credential-tag': 'cloud_credential_tag', 'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'controller-uuid': 'controller_uuid', 'default-series': 'default_series', 'life': 'life', 'machines': 'machines', 'migration': 'migration', 'name': 'name', 'owner-tag': 'owner_tag', 'provider-type': 'provider_type', 'status': 'status', 'users': 'users', 'uuid': 'uuid'}
+    def __init__(self, cloud_credential_tag=None, cloud_region=None, cloud_tag=None, controller_uuid=None, default_series=None, life=None, machines=None, migration=None, name=None, owner_tag=None, provider_type=None, status=None, users=None, uuid=None):
         '''
         cloud_credential_tag : str
         cloud_region : str
@@ -1880,6 +1830,7 @@ class ModelInfo(Type):
         default_series : str
         life : str
         machines : typing.Sequence<+T_co>[~ModelMachineInfo]<~ModelMachineInfo>
+        migration : ModelMigrationStatus
         name : str
         owner_tag : str
         provider_type : str
@@ -1894,6 +1845,7 @@ class ModelInfo(Type):
         self.default_series = default_series
         self.life = life
         self.machines = [ModelMachineInfo.from_json(o) for o in machines or []]
+        self.migration = ModelMigrationStatus.from_json(migration) if migration else None
         self.name = name
         self.owner_tag = owner_tag
         self.provider_type = provider_type
@@ -1922,6 +1874,20 @@ class ModelMachineInfo(Type):
         self.wants_vote = wants_vote
 
 
+class ModelMigrationStatus(Type):
+    _toSchema = {'end': 'end', 'start': 'start', 'status': 'status'}
+    _toPy = {'end': 'end', 'start': 'start', 'status': 'status'}
+    def __init__(self, end=None, start=None, status=None):
+        '''
+        end : str
+        start : str
+        status : str
+        '''
+        self.end = end
+        self.start = start
+        self.status = status
+
+
 class ModelSet(Type):
     _toSchema = {'config': 'config'}
     _toPy = {'config': 'config'}
@@ -2334,6 +2300,30 @@ class CloudCredentialResults(Type):
         self.results = [CloudCredentialResult.from_json(o) for o in results or []]
 
 
+class CloudInstanceTypesConstraint(Type):
+    _toSchema = {'cloud_tag': 'cloud-tag', 'constraints': 'constraints', 'region': 'region'}
+    _toPy = {'cloud-tag': 'cloud_tag', 'constraints': 'constraints', 'region': 'region'}
+    def __init__(self, cloud_tag=None, constraints=None, region=None):
+        '''
+        cloud_tag : str
+        constraints : Value
+        region : str
+        '''
+        self.cloud_tag = cloud_tag
+        self.constraints = Value.from_json(constraints) if constraints else None
+        self.region = region
+
+
+class CloudInstanceTypesConstraints(Type):
+    _toSchema = {'constraints': 'constraints'}
+    _toPy = {'constraints': 'constraints'}
+    def __init__(self, constraints=None):
+        '''
+        constraints : typing.Sequence<+T_co>[~CloudInstanceTypesConstraint]<~CloudInstanceTypesConstraint>
+        '''
+        self.constraints = [CloudInstanceTypesConstraint.from_json(o) for o in constraints or []]
+
+
 class CloudRegion(Type):
     _toSchema = {'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'name': 'name', 'storage_endpoint': 'storage-endpoint'}
     _toPy = {'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'storage-endpoint': 'storage_endpoint'}
@@ -2382,6 +2372,58 @@ class CloudsResult(Type):
         self.clouds = clouds
 
 
+class InstanceType(Type):
+    _toSchema = {'arches': 'arches', 'cost': 'cost', 'cpu_cores': 'cpu-cores', 'deprecated': 'deprecated', 'memory': 'memory', 'name': 'name', 'root_disk': 'root-disk', 'virt_type': 'virt-type'}
+    _toPy = {'arches': 'arches', 'cost': 'cost', 'cpu-cores': 'cpu_cores', 'deprecated': 'deprecated', 'memory': 'memory', 'name': 'name', 'root-disk': 'root_disk', 'virt-type': 'virt_type'}
+    def __init__(self, arches=None, cost=None, cpu_cores=None, deprecated=None, memory=None, name=None, root_disk=None, virt_type=None):
+        '''
+        arches : typing.Sequence<+T_co>[str]
+        cost : int
+        cpu_cores : int
+        deprecated : bool
+        memory : int
+        name : str
+        root_disk : int
+        virt_type : str
+        '''
+        self.arches = arches
+        self.cost = cost
+        self.cpu_cores = cpu_cores
+        self.deprecated = deprecated
+        self.memory = memory
+        self.name = name
+        self.root_disk = root_disk
+        self.virt_type = virt_type
+
+
+class InstanceTypesResult(Type):
+    _toSchema = {'cost_currency': 'cost-currency', 'cost_divisor': 'cost-divisor', 'cost_unit': 'cost-unit', 'error': 'error', 'instance_types': 'instance-types'}
+    _toPy = {'cost-currency': 'cost_currency', 'cost-divisor': 'cost_divisor', 'cost-unit': 'cost_unit', 'error': 'error', 'instance-types': 'instance_types'}
+    def __init__(self, cost_currency=None, cost_divisor=None, cost_unit=None, error=None, instance_types=None):
+        '''
+        cost_currency : str
+        cost_divisor : int
+        cost_unit : str
+        error : Error
+        instance_types : typing.Sequence<+T_co>[~InstanceType]<~InstanceType>
+        '''
+        self.cost_currency = cost_currency
+        self.cost_divisor = cost_divisor
+        self.cost_unit = cost_unit
+        self.error = Error.from_json(error) if error else None
+        self.instance_types = [InstanceType.from_json(o) for o in instance_types or []]
+
+
+class InstanceTypesResults(Type):
+    _toSchema = {'results': 'results'}
+    _toPy = {'results': 'results'}
+    def __init__(self, results=None):
+        '''
+        results : typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
+        '''
+        self.results = [InstanceTypesResult.from_json(o) for o in results or []]
+
+
 class StringsResult(Type):
     _toSchema = {'error': 'error', 'result': 'result'}
     _toPy = {'error': 'error', 'result': 'result'}
@@ -3674,6 +3716,26 @@ class ActionExecutionResults(Type):
         self.results = [ActionExecutionResult.from_json(o) for o in results or []]
 
 
+class ModelInstanceTypesConstraint(Type):
+    _toSchema = {'value': 'value'}
+    _toPy = {'value': 'value'}
+    def __init__(self, value=None):
+        '''
+        value : Value
+        '''
+        self.value = Value.from_json(value) if value else None
+
+
+class ModelInstanceTypesConstraints(Type):
+    _toSchema = {'constraints': 'constraints'}
+    _toPy = {'constraints': 'constraints'}
+    def __init__(self, constraints=None):
+        '''
+        constraints : typing.Sequence<+T_co>[~ModelInstanceTypesConstraint]<~ModelInstanceTypesConstraint>
+        '''
+        self.constraints = [ModelInstanceTypesConstraint.from_json(o) for o in constraints or []]
+
+
 class EntitiesResult(Type):
     _toSchema = {'entities': 'entities', 'error': 'error'}
     _toPy = {'entities': 'entities', 'error': 'error'}
@@ -3757,9 +3819,9 @@ class JobsResults(Type):
 
 
 class NetworkConfig(Type):
-    _toSchema = {'address': 'address', 'cidr': 'cidr', 'config_type': 'config-type', 'device_index': 'device-index', 'disabled': 'disabled', 'dns_search_domains': 'dns-search-domains', 'dns_servers': 'dns-servers', 'gateway_address': 'gateway-address', 'interface_name': 'interface-name', 'interface_type': 'interface-type', 'mac_address': 'mac-address', 'mtu': 'mtu', 'no_auto_start': 'no-auto-start', 'parent_interface_name': 'parent-interface-name', 'provider_address_id': 'provider-address-id', 'provider_id': 'provider-id', 'provider_space_id': 'provider-space-id', 'provider_subnet_id': 'provider-subnet-id', 'provider_vlan_id': 'provider-vlan-id', 'vlan_tag': 'vlan-tag'}
-    _toPy = {'address': 'address', 'cidr': 'cidr', 'config-type': 'config_type', 'device-index': 'device_index', 'disabled': 'disabled', 'dns-search-domains': 'dns_search_domains', 'dns-servers': 'dns_servers', 'gateway-address': 'gateway_address', 'interface-name': 'interface_name', 'interface-type': 'interface_type', 'mac-address': 'mac_address', 'mtu': 'mtu', 'no-auto-start': 'no_auto_start', 'parent-interface-name': 'parent_interface_name', 'provider-address-id': 'provider_address_id', 'provider-id': 'provider_id', 'provider-space-id': 'provider_space_id', 'provider-subnet-id': 'provider_subnet_id', 'provider-vlan-id': 'provider_vlan_id', 'vlan-tag': 'vlan_tag'}
-    def __init__(self, address=None, cidr=None, config_type=None, device_index=None, disabled=None, dns_search_domains=None, dns_servers=None, gateway_address=None, interface_name=None, interface_type=None, mac_address=None, mtu=None, no_auto_start=None, parent_interface_name=None, provider_address_id=None, provider_id=None, provider_space_id=None, provider_subnet_id=None, provider_vlan_id=None, vlan_tag=None):
+    _toSchema = {'address': 'address', 'cidr': 'cidr', 'config_type': 'config-type', 'device_index': 'device-index', 'disabled': 'disabled', 'dns_search_domains': 'dns-search-domains', 'dns_servers': 'dns-servers', 'gateway_address': 'gateway-address', 'interface_name': 'interface-name', 'interface_type': 'interface-type', 'mac_address': 'mac-address', 'mtu': 'mtu', 'no_auto_start': 'no-auto-start', 'parent_interface_name': 'parent-interface-name', 'provider_address_id': 'provider-address-id', 'provider_id': 'provider-id', 'provider_space_id': 'provider-space-id', 'provider_subnet_id': 'provider-subnet-id', 'provider_vlan_id': 'provider-vlan-id', 'routes': 'routes', 'vlan_tag': 'vlan-tag'}
+    _toPy = {'address': 'address', 'cidr': 'cidr', 'config-type': 'config_type', 'device-index': 'device_index', 'disabled': 'disabled', 'dns-search-domains': 'dns_search_domains', 'dns-servers': 'dns_servers', 'gateway-address': 'gateway_address', 'interface-name': 'interface_name', 'interface-type': 'interface_type', 'mac-address': 'mac_address', 'mtu': 'mtu', 'no-auto-start': 'no_auto_start', 'parent-interface-name': 'parent_interface_name', 'provider-address-id': 'provider_address_id', 'provider-id': 'provider_id', 'provider-space-id': 'provider_space_id', 'provider-subnet-id': 'provider_subnet_id', 'provider-vlan-id': 'provider_vlan_id', 'routes': 'routes', 'vlan-tag': 'vlan_tag'}
+    def __init__(self, address=None, cidr=None, config_type=None, device_index=None, disabled=None, dns_search_domains=None, dns_servers=None, gateway_address=None, interface_name=None, interface_type=None, mac_address=None, mtu=None, no_auto_start=None, parent_interface_name=None, provider_address_id=None, provider_id=None, provider_space_id=None, provider_subnet_id=None, provider_vlan_id=None, routes=None, vlan_tag=None):
         '''
         address : str
         cidr : str
@@ -3780,6 +3842,7 @@ class NetworkConfig(Type):
         provider_space_id : str
         provider_subnet_id : str
         provider_vlan_id : str
+        routes : typing.Sequence<+T_co>[~NetworkRoute]<~NetworkRoute>
         vlan_tag : int
         '''
         self.address = address
@@ -3801,9 +3864,24 @@ class NetworkConfig(Type):
         self.provider_space_id = provider_space_id
         self.provider_subnet_id = provider_subnet_id
         self.provider_vlan_id = provider_vlan_id
+        self.routes = [NetworkRoute.from_json(o) for o in routes or []]
         self.vlan_tag = vlan_tag
 
 
+class NetworkRoute(Type):
+    _toSchema = {'destination_cidr': 'destination-cidr', 'gateway_ip': 'gateway-ip', 'metric': 'metric'}
+    _toPy = {'destination-cidr': 'destination_cidr', 'gateway-ip': 'gateway_ip', 'metric': 'metric'}
+    def __init__(self, destination_cidr=None, gateway_ip=None, metric=None):
+        '''
+        destination_cidr : str
+        gateway_ip : str
+        metric : int
+        '''
+        self.destination_cidr = destination_cidr
+        self.gateway_ip = gateway_ip
+        self.metric = metric
+
+
 class SetMachineNetworkConfig(Type):
     _toSchema = {'config': 'config', 'tag': 'tag'}
     _toPy = {'config': 'config', 'tag': 'tag'}
@@ -3993,16 +4071,18 @@ class MasterMigrationStatus(Type):
 
 
 class MigrationModelInfo(Type):
-    _toSchema = {'agent_version': 'agent-version', 'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'}
-    _toPy = {'agent-version': 'agent_version', 'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'}
-    def __init__(self, agent_version=None, name=None, owner_tag=None, uuid=None):
+    _toSchema = {'agent_version': 'agent-version', 'controller_agent_version': 'controller-agent-version', 'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'}
+    _toPy = {'agent-version': 'agent_version', 'controller-agent-version': 'controller_agent_version', 'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'}
+    def __init__(self, agent_version=None, controller_agent_version=None, name=None, owner_tag=None, uuid=None):
         '''
         agent_version : Number
+        controller_agent_version : Number
         name : str
         owner_tag : str
         uuid : str
         '''
         self.agent_version = Number.from_json(agent_version) if agent_version else None
+        self.controller_agent_version = Number.from_json(controller_agent_version) if controller_agent_version else None
         self.name = name
         self.owner_tag = owner_tag
         self.uuid = uuid
@@ -4029,19 +4109,65 @@ class MinionReports(Type):
 
 
 class SerializedModel(Type):
-    _toSchema = {'bytes_': 'bytes', 'charms': 'charms', 'tools': 'tools'}
-    _toPy = {'bytes': 'bytes_', 'charms': 'charms', 'tools': 'tools'}
-    def __init__(self, bytes_=None, charms=None, tools=None):
+    _toSchema = {'bytes_': 'bytes', 'charms': 'charms', 'resources': 'resources', 'tools': 'tools'}
+    _toPy = {'bytes': 'bytes_', 'charms': 'charms', 'resources': 'resources', 'tools': 'tools'}
+    def __init__(self, bytes_=None, charms=None, resources=None, tools=None):
         '''
         bytes_ : typing.Sequence<+T_co>[int]
         charms : typing.Sequence<+T_co>[str]
+        resources : typing.Sequence<+T_co>[~SerializedModelResource]<~SerializedModelResource>
         tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
         '''
         self.bytes_ = bytes_
         self.charms = charms
+        self.resources = [SerializedModelResource.from_json(o) for o in resources or []]
         self.tools = [SerializedModelTools.from_json(o) for o in tools or []]
 
 
+class SerializedModelResource(Type):
+    _toSchema = {'application': 'application', 'application_revision': 'application-revision', 'charmstore_revision': 'charmstore-revision', 'name': 'name', 'unit_revisions': 'unit-revisions'}
+    _toPy = {'application': 'application', 'application-revision': 'application_revision', 'charmstore-revision': 'charmstore_revision', 'name': 'name', 'unit-revisions': 'unit_revisions'}
+    def __init__(self, application=None, application_revision=None, charmstore_revision=None, name=None, unit_revisions=None):
+        '''
+        application : str
+        application_revision : SerializedModelResourceRevision
+        charmstore_revision : SerializedModelResourceRevision
+        name : str
+        unit_revisions : typing.Mapping<~KT, +VT_co>[str, ~SerializedModelResourceRevision]<~SerializedModelResourceRevision>
+        '''
+        self.application = application
+        self.application_revision = SerializedModelResourceRevision.from_json(application_revision) if application_revision else None
+        self.charmstore_revision = SerializedModelResourceRevision.from_json(charmstore_revision) if charmstore_revision else None
+        self.name = name
+        self.unit_revisions = unit_revisions
+
+
+class SerializedModelResourceRevision(Type):
+    _toSchema = {'description': 'description', 'fingerprint': 'fingerprint', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type_': 'type', 'username': 'username'}
+    _toPy = {'description': 'description', 'fingerprint': 'fingerprint', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'timestamp': 'timestamp', 'type': 'type_', 'username': 'username'}
+    def __init__(self, description=None, fingerprint=None, origin=None, path=None, revision=None, size=None, timestamp=None, type_=None, username=None):
+        '''
+        description : str
+        fingerprint : str
+        origin : str
+        path : str
+        revision : int
+        size : int
+        timestamp : str
+        type_ : str
+        username : str
+        '''
+        self.description = description
+        self.fingerprint = fingerprint
+        self.origin = origin
+        self.path = path
+        self.revision = revision
+        self.size = size
+        self.timestamp = timestamp
+        self.type_ = type_
+        self.username = username
+
+
 class SerializedModelTools(Type):
     _toSchema = {'uri': 'uri', 'version': 'version'}
     _toPy = {'uri': 'uri', 'version': 'version'}
@@ -4112,6 +4238,18 @@ class MigrationStatus(Type):
         self.target_ca_cert = target_ca_cert
 
 
+class AdoptResourcesArgs(Type):
+    _toSchema = {'model_tag': 'model-tag', 'source_controller_version': 'source-controller-version'}
+    _toPy = {'model-tag': 'model_tag', 'source-controller-version': 'source_controller_version'}
+    def __init__(self, model_tag=None, source_controller_version=None):
+        '''
+        model_tag : str
+        source_controller_version : Number
+        '''
+        self.model_tag = model_tag
+        self.source_controller_version = Number.from_json(source_controller_version) if source_controller_version else None
+
+
 class ModelArgs(Type):
     _toSchema = {'model_tag': 'model-tag'}
     _toPy = {'model-tag': 'model_tag'}
@@ -4296,6 +4434,128 @@ class UnsetModelDefaults(Type):
         self.keys = [ModelUnsetKeys.from_json(o) for o in keys or []]
 
 
+class EnvListArgs(Type):
+    _toSchema = {'patterns': 'patterns'}
+    _toPy = {'patterns': 'patterns'}
+    def __init__(self, patterns=None):
+        '''
+        patterns : typing.Sequence<+T_co>[str]
+        '''
+        self.patterns = patterns
+
+
+class EnvListResults(Type):
+    _toSchema = {'results': 'results'}
+    _toPy = {'results': 'results'}
+    def __init__(self, results=None):
+        '''
+        results : typing.Sequence<+T_co>[~Payload]<~Payload>
+        '''
+        self.results = [Payload.from_json(o) for o in results or []]
+
+
+class Payload(Type):
+    _toSchema = {'class_': 'class', 'id_': 'id', 'labels': 'labels', 'machine': 'machine', 'status': 'status', 'type_': 'type', 'unit': 'unit'}
+    _toPy = {'class': 'class_', 'id': 'id_', 'labels': 'labels', 'machine': 'machine', 'status': 'status', 'type': 'type_', 'unit': 'unit'}
+    def __init__(self, class_=None, id_=None, labels=None, machine=None, status=None, type_=None, unit=None):
+        '''
+        class_ : str
+        id_ : str
+        labels : typing.Sequence<+T_co>[str]
+        machine : str
+        status : str
+        type_ : str
+        unit : str
+        '''
+        self.class_ = class_
+        self.id_ = id_
+        self.labels = labels
+        self.machine = machine
+        self.status = status
+        self.type_ = type_
+        self.unit = unit
+
+
+class LookUpArg(Type):
+    _toSchema = {'id_': 'id', 'name': 'name'}
+    _toPy = {'id': 'id_', 'name': 'name'}
+    def __init__(self, id_=None, name=None):
+        '''
+        id_ : str
+        name : str
+        '''
+        self.id_ = id_
+        self.name = name
+
+
+class LookUpArgs(Type):
+    _toSchema = {'args': 'args'}
+    _toPy = {'args': 'args'}
+    def __init__(self, args=None):
+        '''
+        args : typing.Sequence<+T_co>[~LookUpArg]<~LookUpArg>
+        '''
+        self.args = [LookUpArg.from_json(o) for o in args or []]
+
+
+class PayloadResult(Type):
+    _toSchema = {'entity': 'Entity', 'error': 'error', 'not_found': 'not-found', 'payload': 'payload'}
+    _toPy = {'Entity': 'entity', 'error': 'error', 'not-found': 'not_found', 'payload': 'payload'}
+    def __init__(self, entity=None, error=None, not_found=None, payload=None):
+        '''
+        entity : Entity
+        error : Error
+        not_found : bool
+        payload : Payload
+        '''
+        self.entity = Entity.from_json(entity) if entity else None
+        self.error = Error.from_json(error) if error else None
+        self.not_found = not_found
+        self.payload = Payload.from_json(payload) if payload else None
+
+
+class PayloadResults(Type):
+    _toSchema = {'results': 'results'}
+    _toPy = {'results': 'results'}
+    def __init__(self, results=None):
+        '''
+        results : typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
+        '''
+        self.results = [PayloadResult.from_json(o) for o in results or []]
+
+
+class SetStatusArg(Type):
+    _toSchema = {'entity': 'Entity', 'status': 'status'}
+    _toPy = {'Entity': 'entity', 'status': 'status'}
+    def __init__(self, entity=None, status=None):
+        '''
+        entity : Entity
+        status : str
+        '''
+        self.entity = Entity.from_json(entity) if entity else None
+        self.status = status
+
+
+class SetStatusArgs(Type):
+    _toSchema = {'args': 'args'}
+    _toPy = {'args': 'args'}
+    def __init__(self, args=None):
+        '''
+        args : typing.Sequence<+T_co>[~SetStatusArg]<~SetStatusArg>
+        '''
+        self.args = [SetStatusArg.from_json(o) for o in args or []]
+
+
+class TrackArgs(Type):
+    _toSchema = {'payloads': 'payloads'}
+    _toPy = {'payloads': 'payloads'}
+    def __init__(self, payloads=None):
+        '''
+        payloads : typing.Sequence<+T_co>[~Payload]<~Payload>
+        '''
+        self.payloads = [Payload.from_json(o) for o in payloads or []]
+
+
 class ConstraintsResult(Type):
     _toSchema = {'constraints': 'constraints', 'error': 'error'}
     _toPy = {'constraints': 'constraints', 'error': 'error'}
@@ -4360,6 +4620,18 @@ class ContainerManagerConfigParams(Type):
         self.type_ = type_
 
 
+class DeviceBridgeInfo(Type):
+    _toSchema = {'bridge_name': 'bridge-name', 'host_device_name': 'host-device-name'}
+    _toPy = {'bridge-name': 'bridge_name', 'host-device-name': 'host_device_name'}
+    def __init__(self, bridge_name=None, host_device_name=None):
+        '''
+        bridge_name : str
+        host_device_name : str
+        '''
+        self.bridge_name = bridge_name
+        self.host_device_name = host_device_name
+
+
 class DistributionGroupResult(Type):
     _toSchema = {'error': 'error', 'result': 'result'}
     _toPy = {'error': 'error', 'result': 'result'}
@@ -4382,6 +4654,30 @@ class DistributionGroupResults(Type):
         self.results = [DistributionGroupResult.from_json(o) for o in results or []]
 
 
+class HostNetworkChange(Type):
+    _toSchema = {'error': 'error', 'new_bridges': 'new-bridges', 'reconfigure_delay': 'reconfigure-delay'}
+    _toPy = {'error': 'error', 'new-bridges': 'new_bridges', 'reconfigure-delay': 'reconfigure_delay'}
+    def __init__(self, error=None, new_bridges=None, reconfigure_delay=None):
+        '''
+        error : Error
+        new_bridges : typing.Sequence<+T_co>[~DeviceBridgeInfo]<~DeviceBridgeInfo>
+        reconfigure_delay : int
+        '''
+        self.error = Error.from_json(error) if error else None
+        self.new_bridges = [DeviceBridgeInfo.from_json(o) for o in new_bridges or []]
+        self.reconfigure_delay = reconfigure_delay
+
+
+class HostNetworkChangeResults(Type):
+    _toSchema = {'results': 'results'}
+    _toPy = {'results': 'results'}
+    def __init__(self, results=None):
+        '''
+        results : typing.Sequence<+T_co>[~HostNetworkChange]<~HostNetworkChange>
+        '''
+        self.results = [HostNetworkChange.from_json(o) for o in results or []]
+
+
 class InstanceInfo(Type):
     _toSchema = {'characteristics': 'characteristics', 'instance_id': 'instance-id', 'network_config': 'network-config', 'nonce': 'nonce', 'tag': 'tag', 'volume_attachments': 'volume-attachments', 'volumes': 'volumes'}
     _toPy = {'characteristics': 'characteristics', 'instance-id': 'instance_id', 'network-config': 'network_config', 'nonce': 'nonce', 'tag': 'tag', 'volume-attachments': 'volume_attachments', 'volumes': 'volumes'}
@@ -4764,55 +5060,283 @@ class UnitSettings(Type):
         self.version = version
 
 
-class RetryStrategy(Type):
-    _toSchema = {'jitter_retry_time': 'jitter-retry-time', 'max_retry_time': 'max-retry-time', 'min_retry_time': 'min-retry-time', 'retry_time_factor': 'retry-time-factor', 'should_retry': 'should-retry'}
-    _toPy = {'jitter-retry-time': 'jitter_retry_time', 'max-retry-time': 'max_retry_time', 'min-retry-time': 'min_retry_time', 'retry-time-factor': 'retry_time_factor', 'should-retry': 'should_retry'}
-    def __init__(self, jitter_retry_time=None, max_retry_time=None, min_retry_time=None, retry_time_factor=None, should_retry=None):
+class RemoteApplicationChange(Type):
+    _toSchema = {'application_tag': 'application-tag', 'life': 'life', 'relations': 'relations'}
+    _toPy = {'application-tag': 'application_tag', 'life': 'life', 'relations': 'relations'}
+    def __init__(self, application_tag=None, life=None, relations=None):
         '''
-        jitter_retry_time : bool
-        max_retry_time : int
-        min_retry_time : int
-        retry_time_factor : int
-        should_retry : bool
+        application_tag : str
+        life : str
+        relations : RemoteRelationsChange
         '''
-        self.jitter_retry_time = jitter_retry_time
-        self.max_retry_time = max_retry_time
-        self.min_retry_time = min_retry_time
-        self.retry_time_factor = retry_time_factor
-        self.should_retry = should_retry
+        self.application_tag = application_tag
+        self.life = life
+        self.relations = RemoteRelationsChange.from_json(relations) if relations else None
 
 
-class RetryStrategyResult(Type):
-    _toSchema = {'error': 'error', 'result': 'result'}
-    _toPy = {'error': 'error', 'result': 'result'}
-    def __init__(self, error=None, result=None):
+class RemoteApplicationWatchResult(Type):
+    _toSchema = {'change': 'change', 'error': 'error', 'id_': 'id'}
+    _toPy = {'change': 'change', 'error': 'error', 'id': 'id_'}
+    def __init__(self, change=None, error=None, id_=None):
         '''
+        change : RemoteApplicationChange
         error : Error
-        result : RetryStrategy
+        id_ : str
         '''
+        self.change = RemoteApplicationChange.from_json(change) if change else None
         self.error = Error.from_json(error) if error else None
-        self.result = RetryStrategy.from_json(result) if result else None
+        self.id_ = id_
 
 
-class RetryStrategyResults(Type):
-    _toSchema = {'results': 'results'}
-    _toPy = {'results': 'results'}
-    def __init__(self, results=None):
+class RemoteEntityId(Type):
+    _toSchema = {'model_uuid': 'model-uuid', 'token': 'token'}
+    _toPy = {'model-uuid': 'model_uuid', 'token': 'token'}
+    def __init__(self, model_uuid=None, token=None):
         '''
-        results : typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
+        model_uuid : str
+        token : str
         '''
-        self.results = [RetryStrategyResult.from_json(o) for o in results or []]
+        self.model_uuid = model_uuid
+        self.token = token
 
 
-class SSHAddressResult(Type):
-    _toSchema = {'address': 'address', 'error': 'error'}
-    _toPy = {'address': 'address', 'error': 'error'}
-    def __init__(self, address=None, error=None):
+class RemoteRelationChange(Type):
+    _toSchema = {'changed_units': 'changed-units', 'departed_units': 'departed-units', 'id_': 'id', 'life': 'life'}
+    _toPy = {'changed-units': 'changed_units', 'departed-units': 'departed_units', 'id': 'id_', 'life': 'life'}
+    def __init__(self, changed_units=None, departed_units=None, id_=None, life=None):
         '''
-        address : str
-        error : Error
+        changed_units : typing.Mapping<~KT, +VT_co>[str, ~RemoteRelationUnitChange]<~RemoteRelationUnitChange>
+        departed_units : typing.Sequence<+T_co>[str]
+        id_ : int
+        life : str
         '''
-        self.address = address
+        self.changed_units = changed_units
+        self.departed_units = departed_units
+        self.id_ = id_
+        self.life = life
+
+
+class RemoteRelationUnitChange(Type):
+    _toSchema = {'settings': 'settings', 'unit_id': 'unit-id'}
+    _toPy = {'settings': 'settings', 'unit-id': 'unit_id'}
+    def __init__(self, settings=None, unit_id=None):
+        '''
+        settings : typing.Mapping<~KT, +VT_co>[str, typing.Any]
+        unit_id : RemoteEntityId
+        '''
+        self.settings = settings
+        self.unit_id = RemoteEntityId.from_json(unit_id) if unit_id else None
+
+
+class RemoteRelationsChange(Type):
+    _toSchema = {'changed': 'changed', 'initial': 'initial', 'removed': 'removed'}
+    _toPy = {'changed': 'changed', 'initial': 'initial', 'removed': 'removed'}
+    def __init__(self, changed=None, initial=None, removed=None):
+        '''
+        changed : typing.Sequence<+T_co>[~RemoteRelationChange]<~RemoteRelationChange>
+        initial : bool
+        removed : typing.Sequence<+T_co>[int]
+        '''
+        self.changed = [RemoteRelationChange.from_json(o) for o in changed or []]
+        self.initial = initial
+        self.removed = removed
+
+
+class RemoteRelationsWatchResult(Type):
+    _toSchema = {'change': 'change', 'error': 'error', 'remoterelationswatcherid': 'RemoteRelationsWatcherId'}
+    _toPy = {'RemoteRelationsWatcherId': 'remoterelationswatcherid', 'change': 'change', 'error': 'error'}
+    def __init__(self, remoterelationswatcherid=None, change=None, error=None):
+        '''
+        remoterelationswatcherid : str
+        change : RemoteRelationsChange
+        error : Error
+        '''
+        self.remoterelationswatcherid = remoterelationswatcherid
+        self.change = RemoteRelationsChange.from_json(change) if change else None
+        self.error = Error.from_json(error) if error else None
+
+
+class AddPendingResourcesArgs(Type):
+    _toSchema = {'addcharmwithauthorization': 'AddCharmWithAuthorization', 'entity': 'Entity', 'resources': 'Resources'}
+    _toPy = {'AddCharmWithAuthorization': 'addcharmwithauthorization', 'Entity': 'entity', 'Resources': 'resources'}
+    def __init__(self, addcharmwithauthorization=None, entity=None, resources=None):
+        '''
+        addcharmwithauthorization : AddCharmWithAuthorization
+        entity : Entity
+        resources : typing.Sequence<+T_co>[~CharmResource]<~CharmResource>
+        '''
+        self.addcharmwithauthorization = AddCharmWithAuthorization.from_json(addcharmwithauthorization) if addcharmwithauthorization else None
+        self.entity = Entity.from_json(entity) if entity else None
+        self.resources = [CharmResource.from_json(o) for o in resources or []]
+
+
+class AddPendingResourcesResult(Type):
+    _toSchema = {'errorresult': 'ErrorResult', 'pending_ids': 'pending-ids'}
+    _toPy = {'ErrorResult': 'errorresult', 'pending-ids': 'pending_ids'}
+    def __init__(self, errorresult=None, pending_ids=None):
+        '''
+        errorresult : ErrorResult
+        pending_ids : typing.Sequence<+T_co>[str]
+        '''
+        self.errorresult = ErrorResult.from_json(errorresult) if errorresult else None
+        self.pending_ids = pending_ids
+
+
+class CharmResource(Type):
+    _toSchema = {'description': 'description', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type_': 'type'}
+    _toPy = {'description': 'description', 'fingerprint': 'fingerprint', 'name': 'name', 'origin': 'origin', 'path': 'path', 'revision': 'revision', 'size': 'size', 'type': 'type_'}
+    def __init__(self, description=None, fingerprint=None, name=None, origin=None, path=None, revision=None, size=None, type_=None):
+        '''
+        description : str
+        fingerprint : typing.Sequence<+T_co>[int]
+        name : str
+        origin : str
+        path : str
+        revision : int
+        size : int
+        type_ : str
+        '''
+        self.description = description
+        self.fingerprint = fingerprint
+        self.name = name
+        self.origin = origin
+        self.path = path
+        self.revision = revision
+        self.size = size
+        self.type_ = type_
+
+
+class ListResourcesArgs(Type):
+    _toSchema = {'entities': 'entities'}
+    _toPy = {'entities': 'entities'}
+    def __init__(self, entities=None):
+        '''
+        entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+        '''
+        self.entities = [Entity.from_json(o) for o in entities or []]
+
+
+class Resource(Type):
+    _toSchema = {'application': 'application', 'charmresource': 'CharmResource', 'id_': 'id', 'pending_id': 'pending-id', 'timestamp': 'timestamp', 'username': 'username'}
+    _toPy = {'CharmResource': 'charmresource', 'application': 'application', 'id': 'id_', 'pending-id': 'pending_id', 'timestamp': 'timestamp', 'username': 'username'}
+    def __init__(self, charmresource=None, application=None, id_=None, pending_id=None, timestamp=None, username=None):
+        '''
+        charmresource : CharmResource
+        application : str
+        id_ : str
+        pending_id : str
+        timestamp : str
+        username : str
+        '''
+        self.charmresource = CharmResource.from_json(charmresource) if charmresource else None
+        self.application = application
+        self.id_ = id_
+        self.pending_id = pending_id
+        self.timestamp = timestamp
+        self.username = username
+
+
+class ResourcesResult(Type):
+    _toSchema = {'charm_store_resources': 'charm-store-resources', 'errorresult': 'ErrorResult', 'resources': 'resources', 'unit_resources': 'unit-resources'}
+    _toPy = {'ErrorResult': 'errorresult', 'charm-store-resources': 'charm_store_resources', 'resources': 'resources', 'unit-resources': 'unit_resources'}
+    def __init__(self, errorresult=None, charm_store_resources=None, resources=None, unit_resources=None):
+        '''
+        errorresult : ErrorResult
+        charm_store_resources : typing.Sequence<+T_co>[~CharmResource]<~CharmResource>
+        resources : typing.Sequence<+T_co>[~Resource]<~Resource>
+        unit_resources : typing.Sequence<+T_co>[~UnitResources]<~UnitResources>
+        '''
+        self.errorresult = ErrorResult.from_json(errorresult) if errorresult else None
+        self.charm_store_resources = [CharmResource.from_json(o) for o in charm_store_resources or []]
+        self.resources = [Resource.from_json(o) for o in resources or []]
+        self.unit_resources = [UnitResources.from_json(o) for o in unit_resources or []]
+
+
+class ResourcesResults(Type):
+    _toSchema = {'results': 'results'}
+    _toPy = {'results': 'results'}
+    def __init__(self, results=None):
+        '''
+        results : typing.Sequence<+T_co>[~ResourcesResult]<~ResourcesResult>
+        '''
+        self.results = [ResourcesResult.from_json(o) for o in results or []]
+
+
+class UnitResources(Type):
+    _toSchema = {'download_progress': 'download-progress', 'entity': 'Entity', 'resources': 'resources'}
+    _toPy = {'Entity': 'entity', 'download-progress': 'download_progress', 'resources': 'resources'}
+    def __init__(self, entity=None, download_progress=None, resources=None):
+        '''
+        entity : Entity
+        download_progress : typing.Mapping<~KT, +VT_co>[str, int]
+        resources : typing.Sequence<+T_co>[~Resource]<~Resource>
+        '''
+        self.entity = Entity.from_json(entity) if entity else None
+        self.download_progress = download_progress
+        self.resources = [Resource.from_json(o) for o in resources or []]
+
+
+class ResourceResult(Type):
+    _toSchema = {'errorresult': 'ErrorResult', 'resource': 'resource'}
+    _toPy = {'ErrorResult': 'errorresult', 'resource': 'resource'}
+    def __init__(self, errorresult=None, resource=None):
+        '''
+        errorresult : ErrorResult
+        resource : Resource
+        '''
+        self.errorresult = ErrorResult.from_json(errorresult) if errorresult else None
+        self.resource = Resource.from_json(resource) if resource else None
+
+
+class RetryStrategy(Type):
+    _toSchema = {'jitter_retry_time': 'jitter-retry-time', 'max_retry_time': 'max-retry-time', 'min_retry_time': 'min-retry-time', 'retry_time_factor': 'retry-time-factor', 'should_retry': 'should-retry'}
+    _toPy = {'jitter-retry-time': 'jitter_retry_time', 'max-retry-time': 'max_retry_time', 'min-retry-time': 'min_retry_time', 'retry-time-factor': 'retry_time_factor', 'should-retry': 'should_retry'}
+    def __init__(self, jitter_retry_time=None, max_retry_time=None, min_retry_time=None, retry_time_factor=None, should_retry=None):
+        '''
+        jitter_retry_time : bool
+        max_retry_time : int
+        min_retry_time : int
+        retry_time_factor : int
+        should_retry : bool
+        '''
+        self.jitter_retry_time = jitter_retry_time
+        self.max_retry_time = max_retry_time
+        self.min_retry_time = min_retry_time
+        self.retry_time_factor = retry_time_factor
+        self.should_retry = should_retry
+
+
+class RetryStrategyResult(Type):
+    _toSchema = {'error': 'error', 'result': 'result'}
+    _toPy = {'error': 'error', 'result': 'result'}
+    def __init__(self, error=None, result=None):
+        '''
+        error : Error
+        result : RetryStrategy
+        '''
+        self.error = Error.from_json(error) if error else None
+        self.result = RetryStrategy.from_json(result) if result else None
+
+
+class RetryStrategyResults(Type):
+    _toSchema = {'results': 'results'}
+    _toPy = {'results': 'results'}
+    def __init__(self, results=None):
+        '''
+        results : typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
+        '''
+        self.results = [RetryStrategyResult.from_json(o) for o in results or []]
+
+
+class SSHAddressResult(Type):
+    _toSchema = {'address': 'address', 'error': 'error'}
+    _toPy = {'address': 'address', 'error': 'error'}
+    def __init__(self, address=None, error=None):
+        '''
+        address : str
+        error : Error
+        '''
+        self.address = address
         self.error = Error.from_json(error) if error else None
 
 
@@ -7865,81 +8389,6 @@ class ApplicationFacade(Type):
         return reply
 
 
-class ApplicationRelationsWatcherFacade(Type):
-    name = 'ApplicationRelationsWatcher'
-    version = 1
-    schema =     {'definitions': {'ApplicationRelationsChange': {'additionalProperties': False,
-                                                    'properties': {'changed': {'items': {'$ref': '#/definitions/RelationChange'},
-                                                                               'type': 'array'},
-                                                                   'removed': {'items': {'type': 'integer'},
-                                                                               'type': 'array'}},
-                                                    'type': 'object'},
-                     'ApplicationRelationsWatchResult': {'additionalProperties': False,
-                                                         'properties': {'ApplicationRelationsWatcherId': {'type': 'string'},
-                                                                        'changes': {'$ref': '#/definitions/ApplicationRelationsChange'},
-                                                                        'error': {'$ref': '#/definitions/Error'}},
-                                                         'required': ['ApplicationRelationsWatcherId'],
-                                                         'type': 'object'},
-                     'Error': {'additionalProperties': False,
-                               'properties': {'code': {'type': 'string'},
-                                              'info': {'$ref': '#/definitions/ErrorInfo'},
-                                              'message': {'type': 'string'}},
-                               'required': ['message', 'code'],
-                               'type': 'object'},
-                     'ErrorInfo': {'additionalProperties': False,
-                                   'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
-                                                  'macaroon-path': {'type': 'string'}},
-                                   'type': 'object'},
-                     'Macaroon': {'additionalProperties': False, 'type': 'object'},
-                     'RelationChange': {'additionalProperties': False,
-                                        'properties': {'changedunits': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationUnitChange'}},
-                                                                        'type': 'object'},
-                                                       'departedunits': {'items': {'type': 'string'},
-                                                                         'type': 'array'},
-                                                       'id': {'type': 'integer'},
-                                                       'life': {'type': 'string'}},
-                                        'required': ['id', 'life'],
-                                        'type': 'object'},
-                     'RelationUnitChange': {'additionalProperties': False,
-                                            'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
-                                                                                                     'type': 'object'}},
-                                                                        'type': 'object'}},
-                                            'type': 'object'}},
-     'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/ApplicationRelationsWatchResult'}},
-                             'type': 'object'},
-                    'Stop': {'type': 'object'}},
-     'type': 'object'}
-    
-
-    @ReturnMapping(ApplicationRelationsWatchResult)
-    async def Next(self):
-        '''
-
-        Returns -> typing.Union[str, _ForwardRef('ApplicationRelationsChange'), _ForwardRef('Error')]
-        '''
-        # map input types to rpc msg
-        _params = dict()
-        msg = dict(type='ApplicationRelationsWatcher', request='Next', version=1, params=_params)
-
-        reply = await self.rpc(msg)
-        return reply
-
-
-
-    @ReturnMapping(None)
-    async def Stop(self):
-        '''
-
-        Returns -> None
-        '''
-        # map input types to rpc msg
-        _params = dict()
-        msg = dict(type='ApplicationRelationsWatcher', request='Stop', version=1, params=_params)
-
-        reply = await self.rpc(msg)
-        return reply
-
-
 class ApplicationScalerFacade(Type):
     name = 'ApplicationScaler'
     version = 1
@@ -8941,6 +9390,7 @@ class ClientFacade(Type):
                                          'type': 'object'},
                      'MachineStatus': {'additionalProperties': False,
                                        'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
+                                                      'constraints': {'type': 'string'},
                                                       'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
                                                                      'type': 'object'},
                                                       'dns-name': {'type': 'string'},
@@ -8963,6 +9413,7 @@ class ClientFacade(Type):
                                                     'series',
                                                     'id',
                                                     'containers',
+                                                    'constraints',
                                                     'hardware',
                                                     'jobs',
                                                     'has-vote',
@@ -8987,6 +9438,7 @@ class ClientFacade(Type):
                                                   'life': {'type': 'string'},
                                                   'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
                                                                'type': 'array'},
+                                                  'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
                                                   'name': {'type': 'string'},
                                                   'owner-tag': {'type': 'string'},
                                                   'provider-type': {'type': 'string'},
@@ -9015,6 +9467,14 @@ class ClientFacade(Type):
                                                          'wants-vote': {'type': 'boolean'}},
                                           'required': ['id'],
                                           'type': 'object'},
+                     'ModelMigrationStatus': {'additionalProperties': False,
+                                              'properties': {'end': {'format': 'date-time',
+                                                                     'type': 'string'},
+                                                             'start': {'format': 'date-time',
+                                                                       'type': 'string'},
+                                                             'status': {'type': 'string'}},
+                                              'required': ['status', 'start'],
+                                              'type': 'object'},
                      'ModelSet': {'additionalProperties': False,
                                   'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
                                                                                          'type': 'object'}},
@@ -9556,7 +10016,7 @@ class ClientFacade(Type):
     async def ModelInfo(self):
         '''
 
-        Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
+        Returns -> typing.Union[_ForwardRef('ModelMigrationStatus'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
         '''
         # map input types to rpc msg
         _params = dict()
@@ -9801,6 +10261,18 @@ class CloudFacade(Type):
                                                 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
                                                                            'type': 'array'}},
                                                 'type': 'object'},
+                     'CloudInstanceTypesConstraint': {'additionalProperties': False,
+                                                      'properties': {'cloud-tag': {'type': 'string'},
+                                                                     'constraints': {'$ref': '#/definitions/Value'},
+                                                                     'region': {'type': 'string'}},
+                                                      'required': ['cloud-tag',
+                                                                   'region'],
+                                                      'type': 'object'},
+                     'CloudInstanceTypesConstraints': {'additionalProperties': False,
+                                                       'properties': {'constraints': {'items': {'$ref': '#/definitions/CloudInstanceTypesConstraint'},
+                                                                                      'type': 'array'}},
+                                                       'required': ['constraints'],
+                                                       'type': 'object'},
                      'CloudRegion': {'additionalProperties': False,
                                      'properties': {'endpoint': {'type': 'string'},
                                                     'identity-endpoint': {'type': 'string'},
@@ -9847,6 +10319,31 @@ class CloudFacade(Type):
                                                                  'type': 'array'}},
                                       'required': ['results'],
                                       'type': 'object'},
+                     'InstanceType': {'additionalProperties': False,
+                                      'properties': {'arches': {'items': {'type': 'string'},
+                                                                'type': 'array'},
+                                                     'cost': {'type': 'integer'},
+                                                     'cpu-cores': {'type': 'integer'},
+                                                     'deprecated': {'type': 'boolean'},
+                                                     'memory': {'type': 'integer'},
+                                                     'name': {'type': 'string'},
+                                                     'root-disk': {'type': 'integer'},
+                                                     'virt-type': {'type': 'string'}},
+                                      'required': ['arches', 'cpu-cores', 'memory'],
+                                      'type': 'object'},
+                     'InstanceTypesResult': {'additionalProperties': False,
+                                             'properties': {'cost-currency': {'type': 'string'},
+                                                            'cost-divisor': {'type': 'integer'},
+                                                            'cost-unit': {'type': 'string'},
+                                                            'error': {'$ref': '#/definitions/Error'},
+                                                            'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
+                                                                               'type': 'array'}},
+                                             'type': 'object'},
+                     'InstanceTypesResults': {'additionalProperties': False,
+                                              'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
+                                                                         'type': 'array'}},
+                                              'required': ['results'],
+                                              'type': 'object'},
                      'Macaroon': {'additionalProperties': False, 'type': 'object'},
                      'StringResult': {'additionalProperties': False,
                                       'properties': {'error': {'$ref': '#/definitions/Error'},
@@ -9880,7 +10377,21 @@ class CloudFacade(Type):
                      'UserClouds': {'additionalProperties': False,
                                     'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
                                                                    'type': 'array'}},
-                                    'type': 'object'}},
+                                    'type': 'object'},
+                     'Value': {'additionalProperties': False,
+                               'properties': {'arch': {'type': 'string'},
+                                              'container': {'type': 'string'},
+                                              'cores': {'type': 'integer'},
+                                              'cpu-power': {'type': 'integer'},
+                                              'instance-type': {'type': 'string'},
+                                              'mem': {'type': 'integer'},
+                                              'root-disk': {'type': 'integer'},
+                                              'spaces': {'items': {'type': 'string'},
+                                                         'type': 'array'},
+                                              'tags': {'items': {'type': 'string'},
+                                                       'type': 'array'},
+                                              'virt-type': {'type': 'string'}},
+                               'type': 'object'}},
      'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                              'Result': {'$ref': '#/definitions/CloudResults'}},
                               'type': 'object'},
@@ -9891,6 +10402,9 @@ class CloudFacade(Type):
                                    'type': 'object'},
                     'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
                                      'type': 'object'},
+                    'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/CloudInstanceTypesConstraints'},
+                                                     'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
+                                      'type': 'object'},
                     'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                          'Result': {'$ref': '#/definitions/ErrorResults'}},
                                           'type': 'object'},
@@ -9963,6 +10477,21 @@ class CloudFacade(Type):
 
 
 
+    @ReturnMapping(InstanceTypesResults)
+    async def InstanceTypes(self, constraints):
+        '''
+        constraints : typing.Sequence<+T_co>[~CloudInstanceTypesConstraint]<~CloudInstanceTypesConstraint>
+        Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='Cloud', request='InstanceTypes', version=1, params=_params)
+        _params['constraints'] = constraints
+        reply = await self.rpc(msg)
+        return reply
+
+
+
     @ReturnMapping(ErrorResults)
     async def RevokeCredentials(self, entities):
         '''
@@ -13271,7 +13800,40 @@ class MachineManagerFacade(Type):
                                                                 'tags': {'items': {'type': 'string'},
                                                                          'type': 'array'}},
                                                  'type': 'object'},
+                     'InstanceType': {'additionalProperties': False,
+                                      'properties': {'arches': {'items': {'type': 'string'},
+                                                                'type': 'array'},
+                                                     'cost': {'type': 'integer'},
+                                                     'cpu-cores': {'type': 'integer'},
+                                                     'deprecated': {'type': 'boolean'},
+                                                     'memory': {'type': 'integer'},
+                                                     'name': {'type': 'string'},
+                                                     'root-disk': {'type': 'integer'},
+                                                     'virt-type': {'type': 'string'}},
+                                      'required': ['arches', 'cpu-cores', 'memory'],
+                                      'type': 'object'},
+                     'InstanceTypesResult': {'additionalProperties': False,
+                                             'properties': {'cost-currency': {'type': 'string'},
+                                                            'cost-divisor': {'type': 'integer'},
+                                                            'cost-unit': {'type': 'string'},
+                                                            'error': {'$ref': '#/definitions/Error'},
+                                                            'instance-types': {'items': {'$ref': '#/definitions/InstanceType'},
+                                                                               'type': 'array'}},
+                                             'type': 'object'},
+                     'InstanceTypesResults': {'additionalProperties': False,
+                                              'properties': {'results': {'items': {'$ref': '#/definitions/InstanceTypesResult'},
+                                                                         'type': 'array'}},
+                                              'required': ['results'],
+                                              'type': 'object'},
                      'Macaroon': {'additionalProperties': False, 'type': 'object'},
+                     'ModelInstanceTypesConstraint': {'additionalProperties': False,
+                                                      'properties': {'value': {'$ref': '#/definitions/Value'}},
+                                                      'type': 'object'},
+                     'ModelInstanceTypesConstraints': {'additionalProperties': False,
+                                                       'properties': {'constraints': {'items': {'$ref': '#/definitions/ModelInstanceTypesConstraint'},
+                                                                                      'type': 'array'}},
+                                                       'required': ['constraints'],
+                                                       'type': 'object'},
                      'Placement': {'additionalProperties': False,
                                    'properties': {'directive': {'type': 'string'},
                                                   'scope': {'type': 'string'}},
@@ -13293,7 +13855,10 @@ class MachineManagerFacade(Type):
                                'type': 'object'}},
      'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
                                                    'Result': {'$ref': '#/definitions/AddMachinesResults'}},
-                                    'type': 'object'}},
+                                    'type': 'object'},
+                    'InstanceTypes': {'properties': {'Params': {'$ref': '#/definitions/ModelInstanceTypesConstraints'},
+                                                     'Result': {'$ref': '#/definitions/InstanceTypesResults'}},
+                                      'type': 'object'}},
      'type': 'object'}
     
 
@@ -13311,6 +13876,21 @@ class MachineManagerFacade(Type):
         return reply
 
 
+
+    @ReturnMapping(InstanceTypesResults)
+    async def InstanceTypes(self, constraints):
+        '''
+        constraints : typing.Sequence<+T_co>[~ModelInstanceTypesConstraint]<~ModelInstanceTypesConstraint>
+        Returns -> typing.Sequence<+T_co>[~InstanceTypesResult]<~InstanceTypesResult>
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='MachineManager', request='InstanceTypes', version=2, params=_params)
+        _params['constraints'] = constraints
+        reply = await self.rpc(msg)
+        return reply
+
+
 class MachineUndertakerFacade(Type):
     name = 'MachineUndertaker'
     version = 1
@@ -13564,6 +14144,8 @@ class MachinerFacade(Type):
                                                       'provider-space-id': {'type': 'string'},
                                                       'provider-subnet-id': {'type': 'string'},
                                                       'provider-vlan-id': {'type': 'string'},
+                                                      'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
+                                                                 'type': 'array'},
                                                       'vlan-tag': {'type': 'integer'}},
                                        'required': ['device-index',
                                                     'mac-address',
@@ -13580,6 +14162,14 @@ class MachinerFacade(Type):
                                                     'interface-type',
                                                     'disabled'],
                                        'type': 'object'},
+                     'NetworkRoute': {'additionalProperties': False,
+                                      'properties': {'destination-cidr': {'type': 'string'},
+                                                     'gateway-ip': {'type': 'string'},
+                                                     'metric': {'type': 'integer'}},
+                                      'required': ['destination-cidr',
+                                                   'gateway-ip',
+                                                   'metric'],
+                                      'type': 'object'},
                      'NotifyWatchResult': {'additionalProperties': False,
                                            'properties': {'NotifyWatcherId': {'type': 'string'},
                                                           'error': {'$ref': '#/definitions/Error'}},
@@ -14293,13 +14883,15 @@ class MigrationMasterFacade(Type):
                                                'type': 'object'},
                      'MigrationModelInfo': {'additionalProperties': False,
                                             'properties': {'agent-version': {'$ref': '#/definitions/Number'},
+                                                           'controller-agent-version': {'$ref': '#/definitions/Number'},
                                                            'name': {'type': 'string'},
                                                            'owner-tag': {'type': 'string'},
                                                            'uuid': {'type': 'string'}},
                                             'required': ['uuid',
                                                          'name',
                                                          'owner-tag',
-                                                         'agent-version'],
+                                                         'agent-version',
+                                                         'controller-agent-version'],
                                             'type': 'object'},
                      'MigrationSpec': {'additionalProperties': False,
                                        'properties': {'external-control': {'type': 'boolean'},
@@ -14362,12 +14954,50 @@ class MigrationMasterFacade(Type):
                                                                   'type': 'array'},
                                                         'charms': {'items': {'type': 'string'},
                                                                    'type': 'array'},
+                                                        'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
+                                                                      'type': 'array'},
                                                         'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
                                                                   'type': 'array'}},
-                                         'required': ['bytes', 'charms', 'tools'],
+                                         'required': ['bytes',
+                                                      'charms',
+                                                      'tools',
+                                                      'resources'],
                                          'type': 'object'},
-                     'SerializedModelTools': {'additionalProperties': False,
-                                              'properties': {'uri': {'type': 'string'},
+                     'SerializedModelResource': {'additionalProperties': False,
+                                                 'properties': {'application': {'type': 'string'},
+                                                                'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
+                                                                'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
+                                                                'name': {'type': 'string'},
+                                                                'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}},
+                                                                                   'type': 'object'}},
+                                                 'required': ['application',
+                                                              'name',
+                                                              'application-revision',
+                                                              'charmstore-revision',
+                                                              'unit-revisions'],
+                                                 'type': 'object'},
+                     'SerializedModelResourceRevision': {'additionalProperties': False,
+                                                         'properties': {'description': {'type': 'string'},
+                                                                        'fingerprint': {'type': 'string'},
+                                                                        'origin': {'type': 'string'},
+                                                                        'path': {'type': 'string'},
+                                                                        'revision': {'type': 'integer'},
+                                                                        'size': {'type': 'integer'},
+                                                                        'timestamp': {'format': 'date-time',
+                                                                                      'type': 'string'},
+                                                                        'type': {'type': 'string'},
+                                                                        'username': {'type': 'string'}},
+                                                         'required': ['revision',
+                                                                      'type',
+                                                                      'path',
+                                                                      'description',
+                                                                      'origin',
+                                                                      'fingerprint',
+                                                                      'size',
+                                                                      'timestamp'],
+                                                         'type': 'object'},
+                     'SerializedModelTools': {'additionalProperties': False,
+                                              'properties': {'uri': {'type': 'string'},
                                                              'version': {'type': 'string'}},
                                               'required': ['version', 'uri'],
                                               'type': 'object'},
@@ -14449,7 +15079,7 @@ class MigrationMasterFacade(Type):
     async def ModelInfo(self):
         '''
 
-        Returns -> typing.Union[_ForwardRef('Number'), str]
+        Returns -> typing.Union[_ForwardRef('Number'), _ForwardRef('Number'), str]
         '''
         # map input types to rpc msg
         _params = dict()
@@ -14677,15 +15307,23 @@ class MigrationStatusWatcherFacade(Type):
 class MigrationTargetFacade(Type):
     name = 'MigrationTarget'
     version = 1
-    schema =     {'definitions': {'MigrationModelInfo': {'additionalProperties': False,
+    schema =     {'definitions': {'AdoptResourcesArgs': {'additionalProperties': False,
+                                            'properties': {'model-tag': {'type': 'string'},
+                                                           'source-controller-version': {'$ref': '#/definitions/Number'}},
+                                            'required': ['model-tag',
+                                                         'source-controller-version'],
+                                            'type': 'object'},
+                     'MigrationModelInfo': {'additionalProperties': False,
                                             'properties': {'agent-version': {'$ref': '#/definitions/Number'},
+                                                           'controller-agent-version': {'$ref': '#/definitions/Number'},
                                                            'name': {'type': 'string'},
                                                            'owner-tag': {'type': 'string'},
                                                            'uuid': {'type': 'string'}},
                                             'required': ['uuid',
                                                          'name',
                                                          'owner-tag',
-                                                         'agent-version'],
+                                                         'agent-version',
+                                                         'controller-agent-version'],
                                             'type': 'object'},
                      'ModelArgs': {'additionalProperties': False,
                                    'properties': {'model-tag': {'type': 'string'}},
@@ -14708,10 +15346,48 @@ class MigrationTargetFacade(Type):
                                                                   'type': 'array'},
                                                         'charms': {'items': {'type': 'string'},
                                                                    'type': 'array'},
+                                                        'resources': {'items': {'$ref': '#/definitions/SerializedModelResource'},
+                                                                      'type': 'array'},
                                                         'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
                                                                   'type': 'array'}},
-                                         'required': ['bytes', 'charms', 'tools'],
+                                         'required': ['bytes',
+                                                      'charms',
+                                                      'tools',
+                                                      'resources'],
                                          'type': 'object'},
+                     'SerializedModelResource': {'additionalProperties': False,
+                                                 'properties': {'application': {'type': 'string'},
+                                                                'application-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
+                                                                'charmstore-revision': {'$ref': '#/definitions/SerializedModelResourceRevision'},
+                                                                'name': {'type': 'string'},
+                                                                'unit-revisions': {'patternProperties': {'.*': {'$ref': '#/definitions/SerializedModelResourceRevision'}},
+                                                                                   'type': 'object'}},
+                                                 'required': ['application',
+                                                              'name',
+                                                              'application-revision',
+                                                              'charmstore-revision',
+                                                              'unit-revisions'],
+                                                 'type': 'object'},
+                     'SerializedModelResourceRevision': {'additionalProperties': False,
+                                                         'properties': {'description': {'type': 'string'},
+                                                                        'fingerprint': {'type': 'string'},
+                                                                        'origin': {'type': 'string'},
+                                                                        'path': {'type': 'string'},
+                                                                        'revision': {'type': 'integer'},
+                                                                        'size': {'type': 'integer'},
+                                                                        'timestamp': {'format': 'date-time',
+                                                                                      'type': 'string'},
+                                                                        'type': {'type': 'string'},
+                                                                        'username': {'type': 'string'}},
+                                                         'required': ['revision',
+                                                                      'type',
+                                                                      'path',
+                                                                      'description',
+                                                                      'origin',
+                                                                      'fingerprint',
+                                                                      'size',
+                                                                      'timestamp'],
+                                                         'type': 'object'},
                      'SerializedModelTools': {'additionalProperties': False,
                                               'properties': {'uri': {'type': 'string'},
                                                              'version': {'type': 'string'}},
@@ -14721,8 +15397,14 @@ class MigrationTargetFacade(Type):
                               'type': 'object'},
                     'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
                                  'type': 'object'},
+                    'AdoptResources': {'properties': {'Params': {'$ref': '#/definitions/AdoptResourcesArgs'}},
+                                       'type': 'object'},
                     'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
                                'type': 'object'},
+                    'LatestLogTime': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'},
+                                                     'Result': {'format': 'date-time',
+                                                                'type': 'string'}},
+                                      'type': 'object'},
                     'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}},
                                   'type': 'object'}},
      'type': 'object'}
@@ -14759,10 +15441,28 @@ class MigrationTargetFacade(Type):
 
 
     @ReturnMapping(None)
-    async def Import(self, bytes_, charms, tools):
+    async def AdoptResources(self, model_tag, source_controller_version):
+        '''
+        model_tag : str
+        source_controller_version : Number
+        Returns -> None
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='MigrationTarget', request='AdoptResources', version=1, params=_params)
+        _params['model-tag'] = model_tag
+        _params['source-controller-version'] = source_controller_version
+        reply = await self.rpc(msg)
+        return reply
+
+
+
+    @ReturnMapping(None)
+    async def Import(self, bytes_, charms, resources, tools):
         '''
         bytes_ : typing.Sequence<+T_co>[int]
         charms : typing.Sequence<+T_co>[str]
+        resources : typing.Sequence<+T_co>[~SerializedModelResource]<~SerializedModelResource>
         tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
         Returns -> None
         '''
@@ -14771,16 +15471,33 @@ class MigrationTargetFacade(Type):
         msg = dict(type='MigrationTarget', request='Import', version=1, params=_params)
         _params['bytes'] = bytes_
         _params['charms'] = charms
+        _params['resources'] = resources
         _params['tools'] = tools
         reply = await self.rpc(msg)
         return reply
 
 
 
+    @ReturnMapping(str)
+    async def LatestLogTime(self, model_tag):
+        '''
+        model_tag : str
+        Returns -> str
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='MigrationTarget', request='LatestLogTime', version=1, params=_params)
+        _params['model-tag'] = model_tag
+        reply = await self.rpc(msg)
+        return reply
+
+
+
     @ReturnMapping(None)
-    async def Prechecks(self, agent_version, name, owner_tag, uuid):
+    async def Prechecks(self, agent_version, controller_agent_version, name, owner_tag, uuid):
         '''
         agent_version : Number
+        controller_agent_version : Number
         name : str
         owner_tag : str
         uuid : str
@@ -14790,6 +15507,7 @@ class MigrationTargetFacade(Type):
         _params = dict()
         msg = dict(type='MigrationTarget', request='Prechecks', version=1, params=_params)
         _params['agent-version'] = agent_version
+        _params['controller-agent-version'] = controller_agent_version
         _params['name'] = name
         _params['owner-tag'] = owner_tag
         _params['uuid'] = uuid
@@ -14985,6 +15703,7 @@ class ModelManagerFacade(Type):
                                                   'life': {'type': 'string'},
                                                   'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
                                                                'type': 'array'},
+                                                  'migration': {'$ref': '#/definitions/ModelMigrationStatus'},
                                                   'name': {'type': 'string'},
                                                   'owner-tag': {'type': 'string'},
                                                   'provider-type': {'type': 'string'},
@@ -15022,6 +15741,14 @@ class ModelManagerFacade(Type):
                                                          'wants-vote': {'type': 'boolean'}},
                                           'required': ['id'],
                                           'type': 'object'},
+                     'ModelMigrationStatus': {'additionalProperties': False,
+                                              'properties': {'end': {'format': 'date-time',
+                                                                     'type': 'string'},
+                                                             'start': {'format': 'date-time',
+                                                                       'type': 'string'},
+                                                             'status': {'type': 'string'}},
+                                              'required': ['status', 'start'],
+                                              'type': 'object'},
                      'ModelStatus': {'additionalProperties': False,
                                      'properties': {'application-count': {'type': 'integer'},
                                                     'hosted-machine-count': {'type': 'integer'},
@@ -15145,7 +15872,7 @@ class ModelManagerFacade(Type):
         name : str
         owner_tag : str
         region : str
-        Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
+        Returns -> typing.Union[_ForwardRef('ModelMigrationStatus'), _ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
         '''
         # map input types to rpc msg
         _params = dict()
@@ -15346,6 +16073,227 @@ class NotifyWatcherFacade(Type):
         return reply
 
 
+class PayloadsFacade(Type):
+    name = 'Payloads'
+    version = 1
+    schema =     {'definitions': {'EnvListArgs': {'additionalProperties': False,
+                                     'properties': {'patterns': {'items': {'type': 'string'},
+                                                                 'type': 'array'}},
+                                     'required': ['patterns'],
+                                     'type': 'object'},
+                     'EnvListResults': {'additionalProperties': False,
+                                        'properties': {'results': {'items': {'$ref': '#/definitions/Payload'},
+                                                                   'type': 'array'}},
+                                        'required': ['results'],
+                                        'type': 'object'},
+                     'Payload': {'additionalProperties': False,
+                                 'properties': {'class': {'type': 'string'},
+                                                'id': {'type': 'string'},
+                                                'labels': {'items': {'type': 'string'},
+                                                           'type': 'array'},
+                                                'machine': {'type': 'string'},
+                                                'status': {'type': 'string'},
+                                                'type': {'type': 'string'},
+                                                'unit': {'type': 'string'}},
+                                 'required': ['class',
+                                              'type',
+                                              'id',
+                                              'status',
+                                              'labels',
+                                              'unit',
+                                              'machine'],
+                                 'type': 'object'}},
+     'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/EnvListArgs'},
+                                            'Result': {'$ref': '#/definitions/EnvListResults'}},
+                             'type': 'object'}},
+     'type': 'object'}
+    
+
+    @ReturnMapping(EnvListResults)
+    async def List(self, patterns):
+        '''
+        patterns : typing.Sequence<+T_co>[str]
+        Returns -> typing.Sequence<+T_co>[~Payload]<~Payload>
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='Payloads', request='List', version=1, params=_params)
+        _params['patterns'] = patterns
+        reply = await self.rpc(msg)
+        return reply
+
+
+class PayloadsHookContextFacade(Type):
+    name = 'PayloadsHookContext'
+    version = 1
+    schema =     {'definitions': {'Entities': {'additionalProperties': False,
+                                  'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+                                                              'type': 'array'}},
+                                  'required': ['entities'],
+                                  'type': 'object'},
+                     'Entity': {'additionalProperties': False,
+                                'properties': {'tag': {'type': 'string'}},
+                                'required': ['tag'],
+                                'type': 'object'},
+                     'Error': {'additionalProperties': False,
+                               'properties': {'code': {'type': 'string'},
+                                              'info': {'$ref': '#/definitions/ErrorInfo'},
+                                              'message': {'type': 'string'}},
+                               'required': ['message', 'code'],
+                               'type': 'object'},
+                     'ErrorInfo': {'additionalProperties': False,
+                                   'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+                                                  'macaroon-path': {'type': 'string'}},
+                                   'type': 'object'},
+                     'LookUpArg': {'additionalProperties': False,
+                                   'properties': {'id': {'type': 'string'},
+                                                  'name': {'type': 'string'}},
+                                   'required': ['name', 'id'],
+                                   'type': 'object'},
+                     'LookUpArgs': {'additionalProperties': False,
+                                    'properties': {'args': {'items': {'$ref': '#/definitions/LookUpArg'},
+                                                            'type': 'array'}},
+                                    'required': ['args'],
+                                    'type': 'object'},
+                     'Macaroon': {'additionalProperties': False, 'type': 'object'},
+                     'Payload': {'additionalProperties': False,
+                                 'properties': {'class': {'type': 'string'},
+                                                'id': {'type': 'string'},
+                                                'labels': {'items': {'type': 'string'},
+                                                           'type': 'array'},
+                                                'machine': {'type': 'string'},
+                                                'status': {'type': 'string'},
+                                                'type': {'type': 'string'},
+                                                'unit': {'type': 'string'}},
+                                 'required': ['class',
+                                              'type',
+                                              'id',
+                                              'status',
+                                              'labels',
+                                              'unit',
+                                              'machine'],
+                                 'type': 'object'},
+                     'PayloadResult': {'additionalProperties': False,
+                                       'properties': {'Entity': {'$ref': '#/definitions/Entity'},
+                                                      'error': {'$ref': '#/definitions/Error'},
+                                                      'not-found': {'type': 'boolean'},
+                                                      'payload': {'$ref': '#/definitions/Payload'}},
+                                       'required': ['Entity',
+                                                    'payload',
+                                                    'not-found'],
+                                       'type': 'object'},
+                     'PayloadResults': {'additionalProperties': False,
+                                        'properties': {'results': {'items': {'$ref': '#/definitions/PayloadResult'},
+                                                                   'type': 'array'}},
+                                        'required': ['results'],
+                                        'type': 'object'},
+                     'SetStatusArg': {'additionalProperties': False,
+                                      'properties': {'Entity': {'$ref': '#/definitions/Entity'},
+                                                     'status': {'type': 'string'}},
+                                      'required': ['Entity', 'status'],
+                                      'type': 'object'},
+                     'SetStatusArgs': {'additionalProperties': False,
+                                       'properties': {'args': {'items': {'$ref': '#/definitions/SetStatusArg'},
+                                                               'type': 'array'}},
+                                       'required': ['args'],
+                                       'type': 'object'},
+                     'TrackArgs': {'additionalProperties': False,
+                                   'properties': {'payloads': {'items': {'$ref': '#/definitions/Payload'},
+                                                               'type': 'array'}},
+                                   'required': ['payloads'],
+                                   'type': 'object'}},
+     'properties': {'List': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+                                            'Result': {'$ref': '#/definitions/PayloadResults'}},
+                             'type': 'object'},
+                    'LookUp': {'properties': {'Params': {'$ref': '#/definitions/LookUpArgs'},
+                                              'Result': {'$ref': '#/definitions/PayloadResults'}},
+                               'type': 'object'},
+                    'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatusArgs'},
+                                                 'Result': {'$ref': '#/definitions/PayloadResults'}},
+                                  'type': 'object'},
+                    'Track': {'properties': {'Params': {'$ref': '#/definitions/TrackArgs'},
+                                             'Result': {'$ref': '#/definitions/PayloadResults'}},
+                              'type': 'object'},
+                    'Untrack': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+                                               'Result': {'$ref': '#/definitions/PayloadResults'}},
+                                'type': 'object'}},
+     'type': 'object'}
+    
+
+    @ReturnMapping(PayloadResults)
+    async def List(self, entities):
+        '''
+        entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+        Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='PayloadsHookContext', request='List', version=1, params=_params)
+        _params['entities'] = entities
+        reply = await self.rpc(msg)
+        return reply
+
+
+
+    @ReturnMapping(PayloadResults)
+    async def LookUp(self, args):
+        '''
+        args : typing.Sequence<+T_co>[~LookUpArg]<~LookUpArg>
+        Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='PayloadsHookContext', request='LookUp', version=1, params=_params)
+        _params['args'] = args
+        reply = await self.rpc(msg)
+        return reply
+
+
+
+    @ReturnMapping(PayloadResults)
+    async def SetStatus(self, args):
+        '''
+        args : typing.Sequence<+T_co>[~SetStatusArg]<~SetStatusArg>
+        Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='PayloadsHookContext', request='SetStatus', version=1, params=_params)
+        _params['args'] = args
+        reply = await self.rpc(msg)
+        return reply
+
+
+
+    @ReturnMapping(PayloadResults)
+    async def Track(self, payloads):
+        '''
+        payloads : typing.Sequence<+T_co>[~Payload]<~Payload>
+        Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='PayloadsHookContext', request='Track', version=1, params=_params)
+        _params['payloads'] = payloads
+        reply = await self.rpc(msg)
+        return reply
+
+
+
+    @ReturnMapping(PayloadResults)
+    async def Untrack(self, entities):
+        '''
+        entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+        Returns -> typing.Sequence<+T_co>[~PayloadResult]<~PayloadResult>
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='PayloadsHookContext', request='Untrack', version=1, params=_params)
+        _params['entities'] = entities
+        reply = await self.rpc(msg)
+        return reply
+
+
 class PingerFacade(Type):
     name = 'Pinger'
     version = 1
@@ -15470,6 +16418,12 @@ class ProvisionerFacade(Type):
                                                                           'type': 'object'}},
                                                 'required': ['config'],
                                                 'type': 'object'},
+                     'DeviceBridgeInfo': {'additionalProperties': False,
+                                          'properties': {'bridge-name': {'type': 'string'},
+                                                         'host-device-name': {'type': 'string'}},
+                                          'required': ['host-device-name',
+                                                       'bridge-name'],
+                                          'type': 'object'},
                      'DistributionGroupResult': {'additionalProperties': False,
                                                  'properties': {'error': {'$ref': '#/definitions/Error'},
                                                                 'result': {'items': {'type': 'string'},
@@ -15558,6 +16512,19 @@ class ProvisionerFacade(Type):
                                                                 'tags': {'items': {'type': 'string'},
                                                                          'type': 'array'}},
                                                  'type': 'object'},
+                     'HostNetworkChange': {'additionalProperties': False,
+                                           'properties': {'error': {'$ref': '#/definitions/Error'},
+                                                          'new-bridges': {'items': {'$ref': '#/definitions/DeviceBridgeInfo'},
+                                                                          'type': 'array'},
+                                                          'reconfigure-delay': {'type': 'integer'}},
+                                           'required': ['new-bridges',
+                                                        'reconfigure-delay'],
+                                           'type': 'object'},
+                     'HostNetworkChangeResults': {'additionalProperties': False,
+                                                  'properties': {'results': {'items': {'$ref': '#/definitions/HostNetworkChange'},
+                                                                             'type': 'array'}},
+                                                  'required': ['results'],
+                                                  'type': 'object'},
                      'HostPort': {'additionalProperties': False,
                                   'properties': {'Address': {'$ref': '#/definitions/Address'},
                                                  'port': {'type': 'integer'}},
@@ -15649,6 +16616,8 @@ class ProvisionerFacade(Type):
                                                       'provider-space-id': {'type': 'string'},
                                                       'provider-subnet-id': {'type': 'string'},
                                                       'provider-vlan-id': {'type': 'string'},
+                                                      'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
+                                                                 'type': 'array'},
                                                       'vlan-tag': {'type': 'integer'}},
                                        'required': ['device-index',
                                                     'mac-address',
@@ -15665,6 +16634,14 @@ class ProvisionerFacade(Type):
                                                     'interface-type',
                                                     'disabled'],
                                        'type': 'object'},
+                     'NetworkRoute': {'additionalProperties': False,
+                                      'properties': {'destination-cidr': {'type': 'string'},
+                                                     'gateway-ip': {'type': 'string'},
+                                                     'metric': {'type': 'integer'}},
+                                      'required': ['destination-cidr',
+                                                   'gateway-ip',
+                                                   'metric'],
+                                      'type': 'object'},
                      'NotifyWatchResult': {'additionalProperties': False,
                                            'properties': {'NotifyWatcherId': {'type': 'string'},
                                                           'error': {'$ref': '#/definitions/Error'}},
@@ -15717,6 +16694,12 @@ class ProvisionerFacade(Type):
                                                                             'type': 'array'}},
                                                  'required': ['results'],
                                                  'type': 'object'},
+                     'SetMachineNetworkConfig': {'additionalProperties': False,
+                                                 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
+                                                                           'type': 'array'},
+                                                                'tag': {'type': 'string'}},
+                                                 'required': ['tag', 'config'],
+                                                 'type': 'object'},
                      'SetStatus': {'additionalProperties': False,
                                    'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
                                                                'type': 'array'}},
@@ -15901,6 +16884,9 @@ class ProvisionerFacade(Type):
                     'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                                  'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
                                                   'type': 'object'},
+                    'HostChangesForContainers': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+                                                                'Result': {'$ref': '#/definitions/HostNetworkChangeResults'}},
+                                                 'type': 'object'},
                     'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                                   'Result': {'$ref': '#/definitions/StringResults'}},
                                    'type': 'object'},
@@ -15934,12 +16920,16 @@ class ProvisionerFacade(Type):
                     'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
                                               'Result': {'$ref': '#/definitions/StringResults'}},
                                'type': 'object'},
+                    'SetHostMachineNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
+                                                    'type': 'object'},
                     'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
                                                        'Result': {'$ref': '#/definitions/ErrorResults'}},
                                         'type': 'object'},
                     'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
                                                          'Result': {'$ref': '#/definitions/ErrorResults'}},
                                           'type': 'object'},
+                    'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
+                                                 'type': 'object'},
                     'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
                                                     'Result': {'$ref': '#/definitions/ErrorResults'}},
                                      'type': 'object'},
@@ -16150,6 +17140,21 @@ class ProvisionerFacade(Type):
 
 
 
+    @ReturnMapping(HostNetworkChangeResults)
+    async def HostChangesForContainers(self, entities):
+        '''
+        entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+        Returns -> typing.Sequence<+T_co>[~HostNetworkChange]<~HostNetworkChange>
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='Provisioner', request='HostChangesForContainers', version=3, params=_params)
+        _params['entities'] = entities
+        reply = await self.rpc(msg)
+        return reply
+
+
+
     @ReturnMapping(StringResults)
     async def InstanceId(self, entities):
         '''
@@ -16330,6 +17335,23 @@ class ProvisionerFacade(Type):
 
 
 
+    @ReturnMapping(None)
+    async def SetHostMachineNetworkConfig(self, config, tag):
+        '''
+        config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
+        tag : str
+        Returns -> None
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='Provisioner', request='SetHostMachineNetworkConfig', version=3, params=_params)
+        _params['config'] = config
+        _params['tag'] = tag
+        reply = await self.rpc(msg)
+        return reply
+
+
+
     @ReturnMapping(ErrorResults)
     async def SetInstanceInfo(self, machines):
         '''
@@ -16360,6 +17382,23 @@ class ProvisionerFacade(Type):
 
 
 
+    @ReturnMapping(None)
+    async def SetObservedNetworkConfig(self, config, tag):
+        '''
+        config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
+        tag : str
+        Returns -> None
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='Provisioner', request='SetObservedNetworkConfig', version=3, params=_params)
+        _params['config'] = config
+        _params['tag'] = tag
+        reply = await self.rpc(msg)
+        return reply
+
+
+
     @ReturnMapping(ErrorResults)
     async def SetPasswords(self, changes):
         '''
@@ -16831,6 +17870,421 @@ class RelationUnitsWatcherFacade(Type):
         return reply
 
 
+class RemoteApplicationWatcherFacade(Type):
+    name = 'RemoteApplicationWatcher'
+    version = 1
+    schema =     {'definitions': {'Error': {'additionalProperties': False,
+                               'properties': {'code': {'type': 'string'},
+                                              'info': {'$ref': '#/definitions/ErrorInfo'},
+                                              'message': {'type': 'string'}},
+                               'required': ['message', 'code'],
+                               'type': 'object'},
+                     'ErrorInfo': {'additionalProperties': False,
+                                   'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+                                                  'macaroon-path': {'type': 'string'}},
+                                   'type': 'object'},
+                     'Macaroon': {'additionalProperties': False, 'type': 'object'},
+                     'RemoteApplicationChange': {'additionalProperties': False,
+                                                 'properties': {'application-tag': {'type': 'string'},
+                                                                'life': {'type': 'string'},
+                                                                'relations': {'$ref': '#/definitions/RemoteRelationsChange'}},
+                                                 'required': ['application-tag',
+                                                              'life',
+                                                              'relations'],
+                                                 'type': 'object'},
+                     'RemoteApplicationWatchResult': {'additionalProperties': False,
+                                                      'properties': {'change': {'$ref': '#/definitions/RemoteApplicationChange'},
+                                                                     'error': {'$ref': '#/definitions/Error'},
+                                                                     'id': {'type': 'string'}},
+                                                      'required': ['id'],
+                                                      'type': 'object'},
+                     'RemoteEntityId': {'additionalProperties': False,
+                                        'properties': {'model-uuid': {'type': 'string'},
+                                                       'token': {'type': 'string'}},
+                                        'required': ['model-uuid', 'token'],
+                                        'type': 'object'},
+                     'RemoteRelationChange': {'additionalProperties': False,
+                                              'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
+                                                                               'type': 'object'},
+                                                             'departed-units': {'items': {'type': 'string'},
+                                                                                'type': 'array'},
+                                                             'id': {'type': 'integer'},
+                                                             'life': {'type': 'string'}},
+                                              'required': ['id', 'life'],
+                                              'type': 'object'},
+                     'RemoteRelationUnitChange': {'additionalProperties': False,
+                                                  'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
+                                                                                                           'type': 'object'}},
+                                                                              'type': 'object'},
+                                                                 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
+                                                  'required': ['unit-id'],
+                                                  'type': 'object'},
+                     'RemoteRelationsChange': {'additionalProperties': False,
+                                               'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
+                                                                          'type': 'array'},
+                                                              'initial': {'type': 'boolean'},
+                                                              'removed': {'items': {'type': 'integer'},
+                                                                          'type': 'array'}},
+                                               'required': ['initial'],
+                                               'type': 'object'}},
+     'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteApplicationWatchResult'}},
+                             'type': 'object'},
+                    'Stop': {'type': 'object'}},
+     'type': 'object'}
+    
+
+    @ReturnMapping(RemoteApplicationWatchResult)
+    async def Next(self):
+        '''
+
+        Returns -> typing.Union[_ForwardRef('RemoteApplicationChange'), _ForwardRef('Error'), str]
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='RemoteApplicationWatcher', request='Next', version=1, params=_params)
+
+        reply = await self.rpc(msg)
+        return reply
+
+
+
+    @ReturnMapping(None)
+    async def Stop(self):
+        '''
+
+        Returns -> None
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='RemoteApplicationWatcher', request='Stop', version=1, params=_params)
+
+        reply = await self.rpc(msg)
+        return reply
+
+
+class RemoteRelationsWatcherFacade(Type):
+    name = 'RemoteRelationsWatcher'
+    version = 1
+    schema =     {'definitions': {'Error': {'additionalProperties': False,
+                               'properties': {'code': {'type': 'string'},
+                                              'info': {'$ref': '#/definitions/ErrorInfo'},
+                                              'message': {'type': 'string'}},
+                               'required': ['message', 'code'],
+                               'type': 'object'},
+                     'ErrorInfo': {'additionalProperties': False,
+                                   'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+                                                  'macaroon-path': {'type': 'string'}},
+                                   'type': 'object'},
+                     'Macaroon': {'additionalProperties': False, 'type': 'object'},
+                     'RemoteEntityId': {'additionalProperties': False,
+                                        'properties': {'model-uuid': {'type': 'string'},
+                                                       'token': {'type': 'string'}},
+                                        'required': ['model-uuid', 'token'],
+                                        'type': 'object'},
+                     'RemoteRelationChange': {'additionalProperties': False,
+                                              'properties': {'changed-units': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteRelationUnitChange'}},
+                                                                               'type': 'object'},
+                                                             'departed-units': {'items': {'type': 'string'},
+                                                                                'type': 'array'},
+                                                             'id': {'type': 'integer'},
+                                                             'life': {'type': 'string'}},
+                                              'required': ['id', 'life'],
+                                              'type': 'object'},
+                     'RemoteRelationUnitChange': {'additionalProperties': False,
+                                                  'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
+                                                                                                           'type': 'object'}},
+                                                                              'type': 'object'},
+                                                                 'unit-id': {'$ref': '#/definitions/RemoteEntityId'}},
+                                                  'required': ['unit-id'],
+                                                  'type': 'object'},
+                     'RemoteRelationsChange': {'additionalProperties': False,
+                                               'properties': {'changed': {'items': {'$ref': '#/definitions/RemoteRelationChange'},
+                                                                          'type': 'array'},
+                                                              'initial': {'type': 'boolean'},
+                                                              'removed': {'items': {'type': 'integer'},
+                                                                          'type': 'array'}},
+                                               'required': ['initial'],
+                                               'type': 'object'},
+                     'RemoteRelationsWatchResult': {'additionalProperties': False,
+                                                    'properties': {'RemoteRelationsWatcherId': {'type': 'string'},
+                                                                   'change': {'$ref': '#/definitions/RemoteRelationsChange'},
+                                                                   'error': {'$ref': '#/definitions/Error'}},
+                                                    'required': ['RemoteRelationsWatcherId'],
+                                                    'type': 'object'}},
+     'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RemoteRelationsWatchResult'}},
+                             'type': 'object'},
+                    'Stop': {'type': 'object'}},
+     'type': 'object'}
+    
+
+    @ReturnMapping(RemoteRelationsWatchResult)
+    async def Next(self):
+        '''
+
+        Returns -> typing.Union[str, _ForwardRef('RemoteRelationsChange'), _ForwardRef('Error')]
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='RemoteRelationsWatcher', request='Next', version=1, params=_params)
+
+        reply = await self.rpc(msg)
+        return reply
+
+
+
+    @ReturnMapping(None)
+    async def Stop(self):
+        '''
+
+        Returns -> None
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='RemoteRelationsWatcher', request='Stop', version=1, params=_params)
+
+        reply = await self.rpc(msg)
+        return reply
+
+
+class ResourcesFacade(Type):
+    name = 'Resources'
+    version = 1
+    schema =     {'definitions': {'AddCharmWithAuthorization': {'additionalProperties': False,
+                                                   'properties': {'channel': {'type': 'string'},
+                                                                  'macaroon': {'$ref': '#/definitions/Macaroon'},
+                                                                  'url': {'type': 'string'}},
+                                                   'required': ['url',
+                                                                'channel',
+                                                                'macaroon'],
+                                                   'type': 'object'},
+                     'AddPendingResourcesArgs': {'additionalProperties': False,
+                                                 'properties': {'AddCharmWithAuthorization': {'$ref': '#/definitions/AddCharmWithAuthorization'},
+                                                                'Entity': {'$ref': '#/definitions/Entity'},
+                                                                'Resources': {'items': {'$ref': '#/definitions/CharmResource'},
+                                                                              'type': 'array'}},
+                                                 'required': ['Entity',
+                                                              'AddCharmWithAuthorization',
+                                                              'Resources'],
+                                                 'type': 'object'},
+                     'AddPendingResourcesResult': {'additionalProperties': False,
+                                                   'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
+                                                                  'pending-ids': {'items': {'type': 'string'},
+                                                                                  'type': 'array'}},
+                                                   'required': ['ErrorResult',
+                                                                'pending-ids'],
+                                                   'type': 'object'},
+                     'CharmResource': {'additionalProperties': False,
+                                       'properties': {'description': {'type': 'string'},
+                                                      'fingerprint': {'items': {'type': 'integer'},
+                                                                      'type': 'array'},
+                                                      'name': {'type': 'string'},
+                                                      'origin': {'type': 'string'},
+                                                      'path': {'type': 'string'},
+                                                      'revision': {'type': 'integer'},
+                                                      'size': {'type': 'integer'},
+                                                      'type': {'type': 'string'}},
+                                       'required': ['name',
+                                                    'type',
+                                                    'path',
+                                                    'origin',
+                                                    'revision',
+                                                    'fingerprint',
+                                                    'size'],
+                                       'type': 'object'},
+                     'Entity': {'additionalProperties': False,
+                                'properties': {'tag': {'type': 'string'}},
+                                'required': ['tag'],
+                                'type': 'object'},
+                     'Error': {'additionalProperties': False,
+                               'properties': {'code': {'type': 'string'},
+                                              'info': {'$ref': '#/definitions/ErrorInfo'},
+                                              'message': {'type': 'string'}},
+                               'required': ['message', 'code'],
+                               'type': 'object'},
+                     'ErrorInfo': {'additionalProperties': False,
+                                   'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+                                                  'macaroon-path': {'type': 'string'}},
+                                   'type': 'object'},
+                     'ErrorResult': {'additionalProperties': False,
+                                     'properties': {'error': {'$ref': '#/definitions/Error'}},
+                                     'type': 'object'},
+                     'ListResourcesArgs': {'additionalProperties': False,
+                                           'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+                                                                       'type': 'array'}},
+                                           'required': ['entities'],
+                                           'type': 'object'},
+                     'Macaroon': {'additionalProperties': False, 'type': 'object'},
+                     'Resource': {'additionalProperties': False,
+                                  'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'},
+                                                 'application': {'type': 'string'},
+                                                 'id': {'type': 'string'},
+                                                 'pending-id': {'type': 'string'},
+                                                 'timestamp': {'format': 'date-time',
+                                                               'type': 'string'},
+                                                 'username': {'type': 'string'}},
+                                  'required': ['CharmResource',
+                                               'id',
+                                               'pending-id',
+                                               'application',
+                                               'username',
+                                               'timestamp'],
+                                  'type': 'object'},
+                     'ResourcesResult': {'additionalProperties': False,
+                                         'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
+                                                        'charm-store-resources': {'items': {'$ref': '#/definitions/CharmResource'},
+                                                                                  'type': 'array'},
+                                                        'resources': {'items': {'$ref': '#/definitions/Resource'},
+                                                                      'type': 'array'},
+                                                        'unit-resources': {'items': {'$ref': '#/definitions/UnitResources'},
+                                                                           'type': 'array'}},
+                                         'required': ['ErrorResult',
+                                                      'resources',
+                                                      'charm-store-resources',
+                                                      'unit-resources'],
+                                         'type': 'object'},
+                     'ResourcesResults': {'additionalProperties': False,
+                                          'properties': {'results': {'items': {'$ref': '#/definitions/ResourcesResult'},
+                                                                     'type': 'array'}},
+                                          'required': ['results'],
+                                          'type': 'object'},
+                     'UnitResources': {'additionalProperties': False,
+                                       'properties': {'Entity': {'$ref': '#/definitions/Entity'},
+                                                      'download-progress': {'patternProperties': {'.*': {'type': 'integer'}},
+                                                                            'type': 'object'},
+                                                      'resources': {'items': {'$ref': '#/definitions/Resource'},
+                                                                    'type': 'array'}},
+                                       'required': ['Entity',
+                                                    'resources',
+                                                    'download-progress'],
+                                       'type': 'object'}},
+     'properties': {'AddPendingResources': {'properties': {'Params': {'$ref': '#/definitions/AddPendingResourcesArgs'},
+                                                           'Result': {'$ref': '#/definitions/AddPendingResourcesResult'}},
+                                            'type': 'object'},
+                    'ListResources': {'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'},
+                                                     'Result': {'$ref': '#/definitions/ResourcesResults'}},
+                                      'type': 'object'}},
+     'type': 'object'}
+    
+
+    @ReturnMapping(AddPendingResourcesResult)
+    async def AddPendingResources(self, addcharmwithauthorization, entity, resources):
+        '''
+        addcharmwithauthorization : AddCharmWithAuthorization
+        entity : Entity
+        resources : typing.Sequence<+T_co>[~CharmResource]<~CharmResource>
+        Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[str]]
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='Resources', request='AddPendingResources', version=1, params=_params)
+        _params['AddCharmWithAuthorization'] = addcharmwithauthorization
+        _params['Entity'] = entity
+        _params['Resources'] = resources
+        reply = await self.rpc(msg)
+        return reply
+
+
+
+    @ReturnMapping(ResourcesResults)
+    async def ListResources(self, entities):
+        '''
+        entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+        Returns -> typing.Sequence<+T_co>[~ResourcesResult]<~ResourcesResult>
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='Resources', request='ListResources', version=1, params=_params)
+        _params['entities'] = entities
+        reply = await self.rpc(msg)
+        return reply
+
+
+class ResourcesHookContextFacade(Type):
+    name = 'ResourcesHookContext'
+    version = 1
+    schema =     {'definitions': {'CharmResource': {'additionalProperties': False,
+                                       'properties': {'description': {'type': 'string'},
+                                                      'fingerprint': {'items': {'type': 'integer'},
+                                                                      'type': 'array'},
+                                                      'name': {'type': 'string'},
+                                                      'origin': {'type': 'string'},
+                                                      'path': {'type': 'string'},
+                                                      'revision': {'type': 'integer'},
+                                                      'size': {'type': 'integer'},
+                                                      'type': {'type': 'string'}},
+                                       'required': ['name',
+                                                    'type',
+                                                    'path',
+                                                    'origin',
+                                                    'revision',
+                                                    'fingerprint',
+                                                    'size'],
+                                       'type': 'object'},
+                     'Error': {'additionalProperties': False,
+                               'properties': {'code': {'type': 'string'},
+                                              'info': {'$ref': '#/definitions/ErrorInfo'},
+                                              'message': {'type': 'string'}},
+                               'required': ['message', 'code'],
+                               'type': 'object'},
+                     'ErrorInfo': {'additionalProperties': False,
+                                   'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+                                                  'macaroon-path': {'type': 'string'}},
+                                   'type': 'object'},
+                     'ErrorResult': {'additionalProperties': False,
+                                     'properties': {'error': {'$ref': '#/definitions/Error'}},
+                                     'type': 'object'},
+                     'ListResourcesArgs': {'additionalProperties': False,
+                                           'properties': {'resource-names': {'items': {'type': 'string'},
+                                                                             'type': 'array'}},
+                                           'required': ['resource-names'],
+                                           'type': 'object'},
+                     'Macaroon': {'additionalProperties': False, 'type': 'object'},
+                     'Resource': {'additionalProperties': False,
+                                  'properties': {'CharmResource': {'$ref': '#/definitions/CharmResource'},
+                                                 'application': {'type': 'string'},
+                                                 'id': {'type': 'string'},
+                                                 'pending-id': {'type': 'string'},
+                                                 'timestamp': {'format': 'date-time',
+                                                               'type': 'string'},
+                                                 'username': {'type': 'string'}},
+                                  'required': ['CharmResource',
+                                               'id',
+                                               'pending-id',
+                                               'application',
+                                               'username',
+                                               'timestamp'],
+                                  'type': 'object'},
+                     'ResourceResult': {'additionalProperties': False,
+                                        'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
+                                                       'resource': {'$ref': '#/definitions/Resource'}},
+                                        'required': ['ErrorResult', 'resource'],
+                                        'type': 'object'},
+                     'ResourcesResult': {'additionalProperties': False,
+                                         'properties': {'ErrorResult': {'$ref': '#/definitions/ErrorResult'},
+                                                        'resources': {'items': {'$ref': '#/definitions/ResourceResult'},
+                                                                      'type': 'array'}},
+                                         'required': ['ErrorResult', 'resources'],
+                                         'type': 'object'}},
+     'properties': {'GetResourceInfo': {'properties': {'Params': {'$ref': '#/definitions/ListResourcesArgs'},
+                                                       'Result': {'$ref': '#/definitions/ResourcesResult'}},
+                                        'type': 'object'}},
+     'type': 'object'}
+    
+
+    @ReturnMapping(ResourcesResult)
+    async def GetResourceInfo(self, entities):
+        '''
+        entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+        Returns -> typing.Union[_ForwardRef('ErrorResult'), typing.Sequence<+T_co>[~UnitResources]<~UnitResources>]
+        '''
+        # map input types to rpc msg
+        _params = dict()
+        msg = dict(type='ResourcesHookContext', request='GetResourceInfo', version=1, params=_params)
+        _params['entities'] = entities
+        reply = await self.rpc(msg)
+        return reply
+
+
 class ResumerFacade(Type):
     name = 'Resumer'
     version = 2
@@ -19324,6 +20778,8 @@ class UniterFacade(Type):
                                                       'provider-space-id': {'type': 'string'},
                                                       'provider-subnet-id': {'type': 'string'},
                                                       'provider-vlan-id': {'type': 'string'},
+                                                      'routes': {'items': {'$ref': '#/definitions/NetworkRoute'},
+                                                                 'type': 'array'},
                                                       'vlan-tag': {'type': 'integer'}},
                                        'required': ['device-index',
                                                     'mac-address',
@@ -19340,6 +20796,14 @@ class UniterFacade(Type):
                                                     'interface-type',
                                                     'disabled'],
                                        'type': 'object'},
+                     'NetworkRoute': {'additionalProperties': False,
+                                      'properties': {'destination-cidr': {'type': 'string'},
+                                                     'gateway-ip': {'type': 'string'},
+                                                     'metric': {'type': 'integer'}},
+                                      'required': ['destination-cidr',
+                                                   'gateway-ip',
+                                                   'metric'],
+                                      'type': 'object'},
                      'NotifyWatchResult': {'additionalProperties': False,
                                            'properties': {'NotifyWatcherId': {'type': 'string'},
                                                           'error': {'$ref': '#/definitions/Error'}},
index 817b37b..a7083e6 100644 (file)
@@ -264,6 +264,8 @@ def retspec(defs):
     # Error or the expected Type
     if not defs:
         return None
+    if defs in basic_types:
+        return strcast(defs, False)
     rtypes = _registry.getObj(_types[defs])
     if not rtypes:
         return None
@@ -402,7 +404,10 @@ def _buildMethod(cls, name):
             params = _types.get(spec['$ref'])
         spec = prop.get('Result')
         if spec:
-            result = _types.get(spec['$ref'])
+            if '$ref' in spec:
+                result = _types.get(spec['$ref'])
+            else:
+                result = SCHEMA_TO_PYTHON[spec['type']]
     return makeFunc(cls, name, params, result)
 
 
@@ -620,6 +625,5 @@ def main():
         print(capture, file=fp)
 
 
-
 if __name__ == '__main__':
     main()
index 1191024..474b204 100644 (file)
       }
     }
   },
-  {
-    "Name": "ApplicationRelationsWatcher",
-    "Version": 1,
-    "Schema": {
-      "type": "object",
-      "properties": {
-        "Next": {
-          "type": "object",
-          "properties": {
-            "Result": {
-              "$ref": "#/definitions/ApplicationRelationsWatchResult"
-            }
-          }
-        },
-        "Stop": {
-          "type": "object"
-        }
-      },
-      "definitions": {
-        "ApplicationRelationsChange": {
-          "type": "object",
-          "properties": {
-            "changed": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/RelationChange"
-              }
-            },
-            "removed": {
-              "type": "array",
-              "items": {
-                "type": "integer"
-              }
-            }
-          },
-          "additionalProperties": false
-        },
-        "ApplicationRelationsWatchResult": {
-          "type": "object",
-          "properties": {
-            "ApplicationRelationsWatcherId": {
-              "type": "string"
-            },
-            "changes": {
-              "$ref": "#/definitions/ApplicationRelationsChange"
-            },
-            "error": {
-              "$ref": "#/definitions/Error"
-            }
-          },
-          "additionalProperties": false,
-          "required": [
-            "ApplicationRelationsWatcherId"
-          ]
-        },
-        "Error": {
-          "type": "object",
-          "properties": {
-            "code": {
-              "type": "string"
-            },
-            "info": {
-              "$ref": "#/definitions/ErrorInfo"
-            },
-            "message": {
-              "type": "string"
-            }
-          },
-          "additionalProperties": false,
-          "required": [
-            "message",
-            "code"
-          ]
-        },
-        "ErrorInfo": {
-          "type": "object",
-          "properties": {
-            "macaroon": {
-              "$ref": "#/definitions/Macaroon"
-            },
-            "macaroon-path": {
-              "type": "string"
-            }
-          },
-          "additionalProperties": false
-        },
-        "Macaroon": {
-          "type": "object",
-          "additionalProperties": false
-        },
-        "RelationChange": {
-          "type": "object",
-          "properties": {
-            "changedunits": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "$ref": "#/definitions/RelationUnitChange"
-                }
-              }
-            },
-            "departedunits": {
-              "type": "array",
-              "items": {
-                "type": "string"
-              }
-            },
-            "id": {
-              "type": "integer"
-            },
-            "life": {
-              "type": "string"
-            }
-          },
-          "additionalProperties": false,
-          "required": [
-            "id",
-            "life"
-          ]
-        },
-        "RelationUnitChange": {
-          "type": "object",
-          "properties": {
-            "settings": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "type": "object",
-                  "additionalProperties": true
-                }
-              }
-            }
-          },
-          "additionalProperties": false
-        }
-      }
-    }
-  },
   {
     "Name": "ApplicationScaler",
     "Version": 1,
             "agent-status": {
               "$ref": "#/definitions/DetailedStatus"
             },
+            "constraints": {
+              "type": "string"
+            },
             "containers": {
               "type": "object",
               "patternProperties": {
             "series",
             "id",
             "containers",
+            "constraints",
             "hardware",
             "jobs",
             "has-vote",
                 "$ref": "#/definitions/ModelMachineInfo"
               }
             },
+            "migration": {
+              "$ref": "#/definitions/ModelMigrationStatus"
+            },
             "name": {
               "type": "string"
             },
             "id"
           ]
         },
+        "ModelMigrationStatus": {
+          "type": "object",
+          "properties": {
+            "end": {
+              "type": "string",
+              "format": "date-time"
+            },
+            "start": {
+              "type": "string",
+              "format": "date-time"
+            },
+            "status": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "status",
+            "start"
+          ]
+        },
         "ModelSet": {
           "type": "object",
           "properties": {
             }
           }
         },
+        "InstanceTypes": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/CloudInstanceTypesConstraints"
+            },
+            "Result": {
+              "$ref": "#/definitions/InstanceTypesResults"
+            }
+          }
+        },
         "RevokeCredentials": {
           "type": "object",
           "properties": {
           },
           "additionalProperties": false
         },
+        "CloudInstanceTypesConstraint": {
+          "type": "object",
+          "properties": {
+            "cloud-tag": {
+              "type": "string"
+            },
+            "constraints": {
+              "$ref": "#/definitions/Value"
+            },
+            "region": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "cloud-tag",
+            "region"
+          ]
+        },
+        "CloudInstanceTypesConstraints": {
+          "type": "object",
+          "properties": {
+            "constraints": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/CloudInstanceTypesConstraint"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "constraints"
+          ]
+        },
         "CloudRegion": {
           "type": "object",
           "properties": {
             "results"
           ]
         },
+        "InstanceType": {
+          "type": "object",
+          "properties": {
+            "arches": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            "cost": {
+              "type": "integer"
+            },
+            "cpu-cores": {
+              "type": "integer"
+            },
+            "deprecated": {
+              "type": "boolean"
+            },
+            "memory": {
+              "type": "integer"
+            },
+            "name": {
+              "type": "string"
+            },
+            "root-disk": {
+              "type": "integer"
+            },
+            "virt-type": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "arches",
+            "cpu-cores",
+            "memory"
+          ]
+        },
+        "InstanceTypesResult": {
+          "type": "object",
+          "properties": {
+            "cost-currency": {
+              "type": "string"
+            },
+            "cost-divisor": {
+              "type": "integer"
+            },
+            "cost-unit": {
+              "type": "string"
+            },
+            "error": {
+              "$ref": "#/definitions/Error"
+            },
+            "instance-types": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/InstanceType"
+              }
+            }
+          },
+          "additionalProperties": false
+        },
+        "InstanceTypesResults": {
+          "type": "object",
+          "properties": {
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/InstanceTypesResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
         "Macaroon": {
           "type": "object",
           "additionalProperties": false
             }
           },
           "additionalProperties": false
-        }
-      }
-    }
-  },
-  {
-    "Name": "Controller",
-    "Version": 3,
-    "Schema": {
+        },
+        "Value": {
+          "type": "object",
+          "properties": {
+            "arch": {
+              "type": "string"
+            },
+            "container": {
+              "type": "string"
+            },
+            "cores": {
+              "type": "integer"
+            },
+            "cpu-power": {
+              "type": "integer"
+            },
+            "instance-type": {
+              "type": "string"
+            },
+            "mem": {
+              "type": "integer"
+            },
+            "root-disk": {
+              "type": "integer"
+            },
+            "spaces": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            "tags": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            "virt-type": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false
+        }
+      }
+    }
+  },
+  {
+    "Name": "Controller",
+    "Version": 3,
+    "Schema": {
       "type": "object",
       "properties": {
         "AllModels": {
               "$ref": "#/definitions/AddMachinesResults"
             }
           }
+        },
+        "InstanceTypes": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/ModelInstanceTypesConstraints"
+            },
+            "Result": {
+              "$ref": "#/definitions/InstanceTypesResults"
+            }
+          }
         }
       },
       "definitions": {
           },
           "additionalProperties": false
         },
+        "InstanceType": {
+          "type": "object",
+          "properties": {
+            "arches": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            "cost": {
+              "type": "integer"
+            },
+            "cpu-cores": {
+              "type": "integer"
+            },
+            "deprecated": {
+              "type": "boolean"
+            },
+            "memory": {
+              "type": "integer"
+            },
+            "name": {
+              "type": "string"
+            },
+            "root-disk": {
+              "type": "integer"
+            },
+            "virt-type": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "arches",
+            "cpu-cores",
+            "memory"
+          ]
+        },
+        "InstanceTypesResult": {
+          "type": "object",
+          "properties": {
+            "cost-currency": {
+              "type": "string"
+            },
+            "cost-divisor": {
+              "type": "integer"
+            },
+            "cost-unit": {
+              "type": "string"
+            },
+            "error": {
+              "$ref": "#/definitions/Error"
+            },
+            "instance-types": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/InstanceType"
+              }
+            }
+          },
+          "additionalProperties": false
+        },
+        "InstanceTypesResults": {
+          "type": "object",
+          "properties": {
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/InstanceTypesResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
         "Macaroon": {
           "type": "object",
           "additionalProperties": false
         },
+        "ModelInstanceTypesConstraint": {
+          "type": "object",
+          "properties": {
+            "value": {
+              "$ref": "#/definitions/Value"
+            }
+          },
+          "additionalProperties": false
+        },
+        "ModelInstanceTypesConstraints": {
+          "type": "object",
+          "properties": {
+            "constraints": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/ModelInstanceTypesConstraint"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "constraints"
+          ]
+        },
         "Placement": {
           "type": "object",
           "properties": {
             "provider-vlan-id": {
               "type": "string"
             },
+            "routes": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/NetworkRoute"
+              }
+            },
             "vlan-tag": {
               "type": "integer"
             }
             "disabled"
           ]
         },
+        "NetworkRoute": {
+          "type": "object",
+          "properties": {
+            "destination-cidr": {
+              "type": "string"
+            },
+            "gateway-ip": {
+              "type": "string"
+            },
+            "metric": {
+              "type": "integer"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "destination-cidr",
+            "gateway-ip",
+            "metric"
+          ]
+        },
         "NotifyWatchResult": {
           "type": "object",
           "properties": {
             "agent-version": {
               "$ref": "#/definitions/Number"
             },
+            "controller-agent-version": {
+              "$ref": "#/definitions/Number"
+            },
             "name": {
               "type": "string"
             },
             "uuid",
             "name",
             "owner-tag",
-            "agent-version"
+            "agent-version",
+            "controller-agent-version"
           ]
         },
         "MigrationSpec": {
                 "type": "string"
               }
             },
+            "resources": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/SerializedModelResource"
+              }
+            },
             "tools": {
               "type": "array",
               "items": {
           "required": [
             "bytes",
             "charms",
-            "tools"
+            "tools",
+            "resources"
+          ]
+        },
+        "SerializedModelResource": {
+          "type": "object",
+          "properties": {
+            "application": {
+              "type": "string"
+            },
+            "application-revision": {
+              "$ref": "#/definitions/SerializedModelResourceRevision"
+            },
+            "charmstore-revision": {
+              "$ref": "#/definitions/SerializedModelResourceRevision"
+            },
+            "name": {
+              "type": "string"
+            },
+            "unit-revisions": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "$ref": "#/definitions/SerializedModelResourceRevision"
+                }
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "application",
+            "name",
+            "application-revision",
+            "charmstore-revision",
+            "unit-revisions"
+          ]
+        },
+        "SerializedModelResourceRevision": {
+          "type": "object",
+          "properties": {
+            "description": {
+              "type": "string"
+            },
+            "fingerprint": {
+              "type": "string"
+            },
+            "origin": {
+              "type": "string"
+            },
+            "path": {
+              "type": "string"
+            },
+            "revision": {
+              "type": "integer"
+            },
+            "size": {
+              "type": "integer"
+            },
+            "timestamp": {
+              "type": "string",
+              "format": "date-time"
+            },
+            "type": {
+              "type": "string"
+            },
+            "username": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "revision",
+            "type",
+            "path",
+            "description",
+            "origin",
+            "fingerprint",
+            "size",
+            "timestamp"
           ]
         },
         "SerializedModelTools": {
             }
           }
         },
+        "AdoptResources": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/AdoptResourcesArgs"
+            }
+          }
+        },
         "Import": {
           "type": "object",
           "properties": {
             }
           }
         },
+        "LatestLogTime": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/ModelArgs"
+            },
+            "Result": {
+              "type": "string",
+              "format": "date-time"
+            }
+          }
+        },
         "Prechecks": {
           "type": "object",
           "properties": {
         }
       },
       "definitions": {
-        "MigrationModelInfo": {
+        "AdoptResourcesArgs": {
           "type": "object",
           "properties": {
-            "agent-version": {
-              "$ref": "#/definitions/Number"
-            },
-            "name": {
-              "type": "string"
-            },
-            "owner-tag": {
+            "model-tag": {
               "type": "string"
             },
-            "uuid": {
-              "type": "string"
+            "source-controller-version": {
+              "$ref": "#/definitions/Number"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "model-tag",
+            "source-controller-version"
+          ]
+        },
+        "MigrationModelInfo": {
+          "type": "object",
+          "properties": {
+            "agent-version": {
+              "$ref": "#/definitions/Number"
+            },
+            "controller-agent-version": {
+              "$ref": "#/definitions/Number"
+            },
+            "name": {
+              "type": "string"
+            },
+            "owner-tag": {
+              "type": "string"
+            },
+            "uuid": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
             "uuid",
             "name",
             "owner-tag",
-            "agent-version"
+            "agent-version",
+            "controller-agent-version"
           ]
         },
         "ModelArgs": {
                 "type": "string"
               }
             },
+            "resources": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/SerializedModelResource"
+              }
+            },
             "tools": {
               "type": "array",
               "items": {
           "required": [
             "bytes",
             "charms",
-            "tools"
+            "tools",
+            "resources"
+          ]
+        },
+        "SerializedModelResource": {
+          "type": "object",
+          "properties": {
+            "application": {
+              "type": "string"
+            },
+            "application-revision": {
+              "$ref": "#/definitions/SerializedModelResourceRevision"
+            },
+            "charmstore-revision": {
+              "$ref": "#/definitions/SerializedModelResourceRevision"
+            },
+            "name": {
+              "type": "string"
+            },
+            "unit-revisions": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "$ref": "#/definitions/SerializedModelResourceRevision"
+                }
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "application",
+            "name",
+            "application-revision",
+            "charmstore-revision",
+            "unit-revisions"
+          ]
+        },
+        "SerializedModelResourceRevision": {
+          "type": "object",
+          "properties": {
+            "description": {
+              "type": "string"
+            },
+            "fingerprint": {
+              "type": "string"
+            },
+            "origin": {
+              "type": "string"
+            },
+            "path": {
+              "type": "string"
+            },
+            "revision": {
+              "type": "integer"
+            },
+            "size": {
+              "type": "integer"
+            },
+            "timestamp": {
+              "type": "string",
+              "format": "date-time"
+            },
+            "type": {
+              "type": "string"
+            },
+            "username": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "revision",
+            "type",
+            "path",
+            "description",
+            "origin",
+            "fingerprint",
+            "size",
+            "timestamp"
           ]
         },
         "SerializedModelTools": {
                 "$ref": "#/definitions/ModelMachineInfo"
               }
             },
+            "migration": {
+              "$ref": "#/definitions/ModelMigrationStatus"
+            },
             "name": {
               "type": "string"
             },
             "id"
           ]
         },
+        "ModelMigrationStatus": {
+          "type": "object",
+          "properties": {
+            "end": {
+              "type": "string",
+              "format": "date-time"
+            },
+            "start": {
+              "type": "string",
+              "format": "date-time"
+            },
+            "status": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "status",
+            "start"
+          ]
+        },
         "ModelStatus": {
           "type": "object",
           "properties": {
     }
   },
   {
-    "Name": "Pinger",
+    "Name": "Payloads",
     "Version": 1,
     "Schema": {
       "type": "object",
       "properties": {
-        "Ping": {
-          "type": "object"
-        },
-        "Stop": {
-          "type": "object"
-        }
-      }
-    }
-  },
-  {
-    "Name": "Provisioner",
-    "Version": 3,
-    "Schema": {
-      "type": "object",
-      "properties": {
-        "APIAddresses": {
-          "type": "object",
-          "properties": {
-            "Result": {
-              "$ref": "#/definitions/StringsResult"
-            }
-          }
-        },
-        "APIHostPorts": {
-          "type": "object",
-          "properties": {
-            "Result": {
-              "$ref": "#/definitions/APIHostPortsResult"
-            }
-          }
-        },
-        "CACert": {
-          "type": "object",
-          "properties": {
-            "Result": {
-              "$ref": "#/definitions/BytesResult"
-            }
-          }
-        },
-        "Constraints": {
+        "List": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/Entities"
+              "$ref": "#/definitions/EnvListArgs"
             },
             "Result": {
-              "$ref": "#/definitions/ConstraintsResults"
+              "$ref": "#/definitions/EnvListResults"
             }
           }
-        },
-        "ContainerConfig": {
+        }
+      },
+      "definitions": {
+        "EnvListArgs": {
           "type": "object",
           "properties": {
-            "Result": {
-              "$ref": "#/definitions/ContainerConfig"
+            "patterns": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "patterns"
+          ]
         },
-        "ContainerManagerConfig": {
+        "EnvListResults": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/ContainerManagerConfigParams"
-            },
-            "Result": {
-              "$ref": "#/definitions/ContainerManagerConfig"
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/Payload"
+              }
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
         },
-        "ControllerConfig": {
+        "Payload": {
           "type": "object",
           "properties": {
-            "Result": {
-              "$ref": "#/definitions/ControllerConfigResult"
+            "class": {
+              "type": "string"
+            },
+            "id": {
+              "type": "string"
+            },
+            "labels": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            "machine": {
+              "type": "string"
+            },
+            "status": {
+              "type": "string"
+            },
+            "type": {
+              "type": "string"
+            },
+            "unit": {
+              "type": "string"
             }
-          }
-        },
-        "DistributionGroup": {
+          },
+          "additionalProperties": false,
+          "required": [
+            "class",
+            "type",
+            "id",
+            "status",
+            "labels",
+            "unit",
+            "machine"
+          ]
+        }
+      }
+    }
+  },
+  {
+    "Name": "PayloadsHookContext",
+    "Version": 1,
+    "Schema": {
+      "type": "object",
+      "properties": {
+        "List": {
           "type": "object",
           "properties": {
             "Params": {
               "$ref": "#/definitions/Entities"
             },
             "Result": {
-              "$ref": "#/definitions/DistributionGroupResults"
+              "$ref": "#/definitions/PayloadResults"
             }
           }
         },
-        "EnsureDead": {
+        "LookUp": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/Entities"
+              "$ref": "#/definitions/LookUpArgs"
             },
             "Result": {
-              "$ref": "#/definitions/ErrorResults"
+              "$ref": "#/definitions/PayloadResults"
             }
           }
         },
-        "FindTools": {
+        "SetStatus": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/FindToolsParams"
+              "$ref": "#/definitions/SetStatusArgs"
             },
             "Result": {
-              "$ref": "#/definitions/FindToolsResult"
+              "$ref": "#/definitions/PayloadResults"
             }
           }
         },
-        "GetContainerInterfaceInfo": {
+        "Track": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/Entities"
+              "$ref": "#/definitions/TrackArgs"
             },
             "Result": {
-              "$ref": "#/definitions/MachineNetworkConfigResults"
+              "$ref": "#/definitions/PayloadResults"
             }
           }
         },
-        "InstanceId": {
+        "Untrack": {
           "type": "object",
           "properties": {
             "Params": {
               "$ref": "#/definitions/Entities"
             },
             "Result": {
-              "$ref": "#/definitions/StringResults"
+              "$ref": "#/definitions/PayloadResults"
             }
           }
-        },
-        "InstanceStatus": {
+        }
+      },
+      "definitions": {
+        "Entities": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
-            },
-            "Result": {
-              "$ref": "#/definitions/StatusResults"
+            "entities": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/Entity"
+              }
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "entities"
+          ]
         },
-        "Life": {
+        "Entity": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
-            },
-            "Result": {
-              "$ref": "#/definitions/LifeResults"
+            "tag": {
+              "type": "string"
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "tag"
+          ]
         },
-        "MachinesWithTransientErrors": {
+        "Error": {
           "type": "object",
           "properties": {
-            "Result": {
-              "$ref": "#/definitions/StatusResults"
+            "code": {
+              "type": "string"
+            },
+            "info": {
+              "$ref": "#/definitions/ErrorInfo"
+            },
+            "message": {
+              "type": "string"
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "message",
+            "code"
+          ]
         },
-        "MarkMachinesForRemoval": {
+        "ErrorInfo": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
+            "macaroon": {
+              "$ref": "#/definitions/Macaroon"
             },
-            "Result": {
-              "$ref": "#/definitions/ErrorResults"
+            "macaroon-path": {
+              "type": "string"
             }
-          }
+          },
+          "additionalProperties": false
         },
-        "ModelConfig": {
+        "LookUpArg": {
           "type": "object",
           "properties": {
-            "Result": {
-              "$ref": "#/definitions/ModelConfigResult"
+            "id": {
+              "type": "string"
+            },
+            "name": {
+              "type": "string"
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "name",
+            "id"
+          ]
         },
-        "ModelUUID": {
+        "LookUpArgs": {
           "type": "object",
           "properties": {
-            "Result": {
-              "$ref": "#/definitions/StringResult"
+            "args": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/LookUpArg"
+              }
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "args"
+          ]
         },
-        "PrepareContainerInterfaceInfo": {
+        "Macaroon": {
+          "type": "object",
+          "additionalProperties": false
+        },
+        "Payload": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
+            "class": {
+              "type": "string"
             },
-            "Result": {
-              "$ref": "#/definitions/MachineNetworkConfigResults"
+            "id": {
+              "type": "string"
+            },
+            "labels": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            "machine": {
+              "type": "string"
+            },
+            "status": {
+              "type": "string"
+            },
+            "type": {
+              "type": "string"
+            },
+            "unit": {
+              "type": "string"
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "class",
+            "type",
+            "id",
+            "status",
+            "labels",
+            "unit",
+            "machine"
+          ]
         },
-        "ProvisioningInfo": {
+        "PayloadResult": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
+            "Entity": {
+              "$ref": "#/definitions/Entity"
             },
-            "Result": {
-              "$ref": "#/definitions/ProvisioningInfoResults"
+            "error": {
+              "$ref": "#/definitions/Error"
+            },
+            "not-found": {
+              "type": "boolean"
+            },
+            "payload": {
+              "$ref": "#/definitions/Payload"
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "Entity",
+            "payload",
+            "not-found"
+          ]
         },
-        "ReleaseContainerAddresses": {
+        "PayloadResults": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
-            },
-            "Result": {
-              "$ref": "#/definitions/ErrorResults"
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/PayloadResult"
+              }
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
         },
-        "Remove": {
+        "SetStatusArg": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
+            "Entity": {
+              "$ref": "#/definitions/Entity"
             },
-            "Result": {
-              "$ref": "#/definitions/ErrorResults"
+            "status": {
+              "type": "string"
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "Entity",
+            "status"
+          ]
         },
-        "Series": {
+        "SetStatusArgs": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
-            },
-            "Result": {
-              "$ref": "#/definitions/StringResults"
+            "args": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/SetStatusArg"
+              }
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "args"
+          ]
         },
-        "SetInstanceInfo": {
+        "TrackArgs": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/InstancesInfo"
-            },
-            "Result": {
-              "$ref": "#/definitions/ErrorResults"
+            "payloads": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/Payload"
+              }
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "payloads"
+          ]
+        }
+      }
+    }
+  },
+  {
+    "Name": "Pinger",
+    "Version": 1,
+    "Schema": {
+      "type": "object",
+      "properties": {
+        "Ping": {
+          "type": "object"
         },
-        "SetInstanceStatus": {
+        "Stop": {
+          "type": "object"
+        }
+      }
+    }
+  },
+  {
+    "Name": "Provisioner",
+    "Version": 3,
+    "Schema": {
+      "type": "object",
+      "properties": {
+        "APIAddresses": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/SetStatus"
-            },
             "Result": {
-              "$ref": "#/definitions/ErrorResults"
+              "$ref": "#/definitions/StringsResult"
             }
           }
         },
-        "SetPasswords": {
+        "APIHostPorts": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/EntityPasswords"
-            },
             "Result": {
-              "$ref": "#/definitions/ErrorResults"
+              "$ref": "#/definitions/APIHostPortsResult"
             }
           }
         },
-        "SetStatus": {
+        "CACert": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/SetStatus"
-            },
             "Result": {
-              "$ref": "#/definitions/ErrorResults"
+              "$ref": "#/definitions/BytesResult"
             }
           }
         },
-        "SetSupportedContainers": {
+        "Constraints": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/MachineContainersParams"
+              "$ref": "#/definitions/Entities"
             },
             "Result": {
-              "$ref": "#/definitions/ErrorResults"
+              "$ref": "#/definitions/ConstraintsResults"
             }
           }
         },
-        "StateAddresses": {
+        "ContainerConfig": {
           "type": "object",
           "properties": {
             "Result": {
-              "$ref": "#/definitions/StringsResult"
+              "$ref": "#/definitions/ContainerConfig"
             }
           }
         },
-        "Status": {
+        "ContainerManagerConfig": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/Entities"
+              "$ref": "#/definitions/ContainerManagerConfigParams"
             },
             "Result": {
-              "$ref": "#/definitions/StatusResults"
+              "$ref": "#/definitions/ContainerManagerConfig"
             }
           }
         },
-        "Tools": {
+        "ControllerConfig": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/ControllerConfigResult"
+            }
+          }
+        },
+        "DistributionGroup": {
           "type": "object",
           "properties": {
             "Params": {
               "$ref": "#/definitions/Entities"
             },
             "Result": {
-              "$ref": "#/definitions/ToolsResults"
+              "$ref": "#/definitions/DistributionGroupResults"
             }
           }
         },
-        "UpdateStatus": {
+        "EnsureDead": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/SetStatus"
+              "$ref": "#/definitions/Entities"
             },
             "Result": {
               "$ref": "#/definitions/ErrorResults"
             }
           }
         },
-        "WatchAPIHostPorts": {
+        "FindTools": {
           "type": "object",
           "properties": {
+            "Params": {
+              "$ref": "#/definitions/FindToolsParams"
+            },
             "Result": {
-              "$ref": "#/definitions/NotifyWatchResult"
+              "$ref": "#/definitions/FindToolsResult"
             }
           }
         },
-        "WatchAllContainers": {
+        "GetContainerInterfaceInfo": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/WatchContainers"
+              "$ref": "#/definitions/Entities"
             },
             "Result": {
-              "$ref": "#/definitions/StringsWatchResults"
+              "$ref": "#/definitions/MachineNetworkConfigResults"
             }
           }
         },
-        "WatchContainers": {
+        "HostChangesForContainers": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/WatchContainers"
+              "$ref": "#/definitions/Entities"
             },
             "Result": {
-              "$ref": "#/definitions/StringsWatchResults"
+              "$ref": "#/definitions/HostNetworkChangeResults"
             }
           }
         },
-        "WatchForModelConfigChanges": {
+        "InstanceId": {
           "type": "object",
           "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
+            },
             "Result": {
-              "$ref": "#/definitions/NotifyWatchResult"
+              "$ref": "#/definitions/StringResults"
             }
           }
         },
-        "WatchMachineErrorRetry": {
+        "InstanceStatus": {
           "type": "object",
           "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
+            },
             "Result": {
-              "$ref": "#/definitions/NotifyWatchResult"
+              "$ref": "#/definitions/StatusResults"
             }
           }
         },
-        "WatchModelMachines": {
+        "Life": {
           "type": "object",
           "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
+            },
             "Result": {
-              "$ref": "#/definitions/StringsWatchResult"
+              "$ref": "#/definitions/LifeResults"
             }
           }
-        }
-      },
-      "definitions": {
-        "APIHostPortsResult": {
+        },
+        "MachinesWithTransientErrors": {
           "type": "object",
           "properties": {
-            "servers": {
-              "type": "array",
-              "items": {
-                "type": "array",
-                "items": {
-                  "$ref": "#/definitions/HostPort"
-                }
-              }
+            "Result": {
+              "$ref": "#/definitions/StatusResults"
             }
-          },
-          "additionalProperties": false,
-          "required": [
-            "servers"
-          ]
+          }
         },
-        "Address": {
+        "MarkMachinesForRemoval": {
           "type": "object",
           "properties": {
-            "scope": {
-              "type": "string"
+            "Params": {
+              "$ref": "#/definitions/Entities"
             },
-            "space-name": {
-              "type": "string"
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
+            }
+          }
+        },
+        "ModelConfig": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/ModelConfigResult"
+            }
+          }
+        },
+        "ModelUUID": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/StringResult"
+            }
+          }
+        },
+        "PrepareContainerInterfaceInfo": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
             },
-            "type": {
-              "type": "string"
+            "Result": {
+              "$ref": "#/definitions/MachineNetworkConfigResults"
+            }
+          }
+        },
+        "ProvisioningInfo": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
             },
-            "value": {
-              "type": "string"
+            "Result": {
+              "$ref": "#/definitions/ProvisioningInfoResults"
             }
-          },
-          "additionalProperties": false,
-          "required": [
-            "value",
-            "type",
-            "scope"
-          ]
+          }
         },
-        "Binary": {
+        "ReleaseContainerAddresses": {
           "type": "object",
           "properties": {
-            "Arch": {
-              "type": "string"
+            "Params": {
+              "$ref": "#/definitions/Entities"
             },
-            "Number": {
-              "$ref": "#/definitions/Number"
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
+            }
+          }
+        },
+        "Remove": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
             },
-            "Series": {
-              "type": "string"
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
             }
-          },
-          "additionalProperties": false,
-          "required": [
-            "Number",
-            "Series",
-            "Arch"
-          ]
+          }
         },
-        "BytesResult": {
+        "Series": {
           "type": "object",
           "properties": {
-            "result": {
-              "type": "array",
-              "items": {
-                "type": "integer"
-              }
+            "Params": {
+              "$ref": "#/definitions/Entities"
+            },
+            "Result": {
+              "$ref": "#/definitions/StringResults"
             }
-          },
-          "additionalProperties": false,
-          "required": [
-            "result"
-          ]
+          }
         },
-        "CloudImageMetadata": {
+        "SetHostMachineNetworkConfig": {
           "type": "object",
           "properties": {
-            "arch": {
+            "Params": {
+              "$ref": "#/definitions/SetMachineNetworkConfig"
+            }
+          }
+        },
+        "SetInstanceInfo": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/InstancesInfo"
+            },
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
+            }
+          }
+        },
+        "SetInstanceStatus": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/SetStatus"
+            },
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
+            }
+          }
+        },
+        "SetObservedNetworkConfig": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/SetMachineNetworkConfig"
+            }
+          }
+        },
+        "SetPasswords": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/EntityPasswords"
+            },
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
+            }
+          }
+        },
+        "SetStatus": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/SetStatus"
+            },
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
+            }
+          }
+        },
+        "SetSupportedContainers": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/MachineContainersParams"
+            },
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
+            }
+          }
+        },
+        "StateAddresses": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/StringsResult"
+            }
+          }
+        },
+        "Status": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
+            },
+            "Result": {
+              "$ref": "#/definitions/StatusResults"
+            }
+          }
+        },
+        "Tools": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
+            },
+            "Result": {
+              "$ref": "#/definitions/ToolsResults"
+            }
+          }
+        },
+        "UpdateStatus": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/SetStatus"
+            },
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
+            }
+          }
+        },
+        "WatchAPIHostPorts": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/NotifyWatchResult"
+            }
+          }
+        },
+        "WatchAllContainers": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/WatchContainers"
+            },
+            "Result": {
+              "$ref": "#/definitions/StringsWatchResults"
+            }
+          }
+        },
+        "WatchContainers": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/WatchContainers"
+            },
+            "Result": {
+              "$ref": "#/definitions/StringsWatchResults"
+            }
+          }
+        },
+        "WatchForModelConfigChanges": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/NotifyWatchResult"
+            }
+          }
+        },
+        "WatchMachineErrorRetry": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/NotifyWatchResult"
+            }
+          }
+        },
+        "WatchModelMachines": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/StringsWatchResult"
+            }
+          }
+        }
+      },
+      "definitions": {
+        "APIHostPortsResult": {
+          "type": "object",
+          "properties": {
+            "servers": {
+              "type": "array",
+              "items": {
+                "type": "array",
+                "items": {
+                  "$ref": "#/definitions/HostPort"
+                }
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "servers"
+          ]
+        },
+        "Address": {
+          "type": "object",
+          "properties": {
+            "scope": {
+              "type": "string"
+            },
+            "space-name": {
+              "type": "string"
+            },
+            "type": {
+              "type": "string"
+            },
+            "value": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "value",
+            "type",
+            "scope"
+          ]
+        },
+        "Binary": {
+          "type": "object",
+          "properties": {
+            "Arch": {
+              "type": "string"
+            },
+            "Number": {
+              "$ref": "#/definitions/Number"
+            },
+            "Series": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "Number",
+            "Series",
+            "Arch"
+          ]
+        },
+        "BytesResult": {
+          "type": "object",
+          "properties": {
+            "result": {
+              "type": "array",
+              "items": {
+                "type": "integer"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "result"
+          ]
+        },
+        "CloudImageMetadata": {
+          "type": "object",
+          "properties": {
+            "arch": {
+              "type": "string"
+            },
+            "image-id": {
+              "type": "string"
+            },
+            "priority": {
+              "type": "integer"
+            },
+            "region": {
+              "type": "string"
+            },
+            "root-storage-size": {
+              "type": "integer"
+            },
+            "root-storage-type": {
+              "type": "string"
+            },
+            "series": {
+              "type": "string"
+            },
+            "source": {
+              "type": "string"
+            },
+            "stream": {
+              "type": "string"
+            },
+            "version": {
+              "type": "string"
+            },
+            "virt-type": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "image-id",
+            "region",
+            "version",
+            "series",
+            "arch",
+            "source",
+            "priority"
+          ]
+        },
+        "ConstraintsResult": {
+          "type": "object",
+          "properties": {
+            "constraints": {
+              "$ref": "#/definitions/Value"
+            },
+            "error": {
+              "$ref": "#/definitions/Error"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "constraints"
+          ]
+        },
+        "ConstraintsResults": {
+          "type": "object",
+          "properties": {
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/ConstraintsResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
+        "ContainerConfig": {
+          "type": "object",
+          "properties": {
+            "UpdateBehavior": {
+              "$ref": "#/definitions/UpdateBehavior"
+            },
+            "apt-mirror": {
+              "type": "string"
+            },
+            "apt-proxy": {
+              "$ref": "#/definitions/Settings"
+            },
+            "authorized-keys": {
+              "type": "string"
+            },
+            "provider-type": {
+              "type": "string"
+            },
+            "proxy": {
+              "$ref": "#/definitions/Settings"
+            },
+            "ssl-hostname-verification": {
+              "type": "boolean"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "provider-type",
+            "authorized-keys",
+            "ssl-hostname-verification",
+            "proxy",
+            "apt-proxy",
+            "apt-mirror",
+            "UpdateBehavior"
+          ]
+        },
+        "ContainerManagerConfig": {
+          "type": "object",
+          "properties": {
+            "config": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "string"
+                }
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "config"
+          ]
+        },
+        "ContainerManagerConfigParams": {
+          "type": "object",
+          "properties": {
+            "type": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "type"
+          ]
+        },
+        "ControllerConfigResult": {
+          "type": "object",
+          "properties": {
+            "config": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "object",
+                  "additionalProperties": true
+                }
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "config"
+          ]
+        },
+        "DeviceBridgeInfo": {
+          "type": "object",
+          "properties": {
+            "bridge-name": {
+              "type": "string"
+            },
+            "host-device-name": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "host-device-name",
+            "bridge-name"
+          ]
+        },
+        "DistributionGroupResult": {
+          "type": "object",
+          "properties": {
+            "error": {
+              "$ref": "#/definitions/Error"
+            },
+            "result": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "result"
+          ]
+        },
+        "DistributionGroupResults": {
+          "type": "object",
+          "properties": {
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/DistributionGroupResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
+        "Entities": {
+          "type": "object",
+          "properties": {
+            "entities": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/Entity"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "entities"
+          ]
+        },
+        "Entity": {
+          "type": "object",
+          "properties": {
+            "tag": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "tag"
+          ]
+        },
+        "EntityPassword": {
+          "type": "object",
+          "properties": {
+            "password": {
+              "type": "string"
+            },
+            "tag": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "tag",
+            "password"
+          ]
+        },
+        "EntityPasswords": {
+          "type": "object",
+          "properties": {
+            "changes": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/EntityPassword"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "changes"
+          ]
+        },
+        "EntityStatusArgs": {
+          "type": "object",
+          "properties": {
+            "data": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "object",
+                  "additionalProperties": true
+                }
+              }
+            },
+            "info": {
+              "type": "string"
+            },
+            "status": {
+              "type": "string"
+            },
+            "tag": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "tag",
+            "status",
+            "info",
+            "data"
+          ]
+        },
+        "Error": {
+          "type": "object",
+          "properties": {
+            "code": {
+              "type": "string"
+            },
+            "info": {
+              "$ref": "#/definitions/ErrorInfo"
+            },
+            "message": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "message",
+            "code"
+          ]
+        },
+        "ErrorInfo": {
+          "type": "object",
+          "properties": {
+            "macaroon": {
+              "$ref": "#/definitions/Macaroon"
+            },
+            "macaroon-path": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false
+        },
+        "ErrorResult": {
+          "type": "object",
+          "properties": {
+            "error": {
+              "$ref": "#/definitions/Error"
+            }
+          },
+          "additionalProperties": false
+        },
+        "ErrorResults": {
+          "type": "object",
+          "properties": {
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/ErrorResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
+        "FindToolsParams": {
+          "type": "object",
+          "properties": {
+            "arch": {
+              "type": "string"
+            },
+            "major": {
+              "type": "integer"
+            },
+            "minor": {
+              "type": "integer"
+            },
+            "number": {
+              "$ref": "#/definitions/Number"
+            },
+            "series": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "number",
+            "major",
+            "minor",
+            "arch",
+            "series"
+          ]
+        },
+        "FindToolsResult": {
+          "type": "object",
+          "properties": {
+            "error": {
+              "$ref": "#/definitions/Error"
+            },
+            "list": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/Tools"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "list"
+          ]
+        },
+        "HardwareCharacteristics": {
+          "type": "object",
+          "properties": {
+            "arch": {
+              "type": "string"
+            },
+            "availability-zone": {
+              "type": "string"
+            },
+            "cpu-cores": {
+              "type": "integer"
+            },
+            "cpu-power": {
+              "type": "integer"
+            },
+            "mem": {
+              "type": "integer"
+            },
+            "root-disk": {
+              "type": "integer"
+            },
+            "tags": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            }
+          },
+          "additionalProperties": false
+        },
+        "HostNetworkChange": {
+          "type": "object",
+          "properties": {
+            "error": {
+              "$ref": "#/definitions/Error"
+            },
+            "new-bridges": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/DeviceBridgeInfo"
+              }
+            },
+            "reconfigure-delay": {
+              "type": "integer"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "new-bridges",
+            "reconfigure-delay"
+          ]
+        },
+        "HostNetworkChangeResults": {
+          "type": "object",
+          "properties": {
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/HostNetworkChange"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
+        "HostPort": {
+          "type": "object",
+          "properties": {
+            "Address": {
+              "$ref": "#/definitions/Address"
+            },
+            "port": {
+              "type": "integer"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "Address",
+            "port"
+          ]
+        },
+        "InstanceInfo": {
+          "type": "object",
+          "properties": {
+            "characteristics": {
+              "$ref": "#/definitions/HardwareCharacteristics"
+            },
+            "instance-id": {
+              "type": "string"
+            },
+            "network-config": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/NetworkConfig"
+              }
+            },
+            "nonce": {
+              "type": "string"
+            },
+            "tag": {
+              "type": "string"
+            },
+            "volume-attachments": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "$ref": "#/definitions/VolumeAttachmentInfo"
+                }
+              }
+            },
+            "volumes": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/Volume"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "tag",
+            "instance-id",
+            "nonce",
+            "characteristics",
+            "volumes",
+            "volume-attachments",
+            "network-config"
+          ]
+        },
+        "InstancesInfo": {
+          "type": "object",
+          "properties": {
+            "machines": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/InstanceInfo"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "machines"
+          ]
+        },
+        "LifeResult": {
+          "type": "object",
+          "properties": {
+            "error": {
+              "$ref": "#/definitions/Error"
+            },
+            "life": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "life"
+          ]
+        },
+        "LifeResults": {
+          "type": "object",
+          "properties": {
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/LifeResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
+        "Macaroon": {
+          "type": "object",
+          "additionalProperties": false
+        },
+        "MachineContainers": {
+          "type": "object",
+          "properties": {
+            "container-types": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            "machine-tag": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "machine-tag",
+            "container-types"
+          ]
+        },
+        "MachineContainersParams": {
+          "type": "object",
+          "properties": {
+            "params": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/MachineContainers"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "params"
+          ]
+        },
+        "MachineNetworkConfigResult": {
+          "type": "object",
+          "properties": {
+            "error": {
+              "$ref": "#/definitions/Error"
+            },
+            "info": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/NetworkConfig"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "info"
+          ]
+        },
+        "MachineNetworkConfigResults": {
+          "type": "object",
+          "properties": {
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/MachineNetworkConfigResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
+        "ModelConfigResult": {
+          "type": "object",
+          "properties": {
+            "config": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "object",
+                  "additionalProperties": true
+                }
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "config"
+          ]
+        },
+        "NetworkConfig": {
+          "type": "object",
+          "properties": {
+            "address": {
+              "type": "string"
+            },
+            "cidr": {
+              "type": "string"
+            },
+            "config-type": {
+              "type": "string"
+            },
+            "device-index": {
+              "type": "integer"
+            },
+            "disabled": {
+              "type": "boolean"
+            },
+            "dns-search-domains": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            "dns-servers": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            "gateway-address": {
               "type": "string"
             },
-            "image-id": {
+            "interface-name": {
               "type": "string"
             },
-            "priority": {
-              "type": "integer"
+            "interface-type": {
+              "type": "string"
             },
-            "region": {
+            "mac-address": {
               "type": "string"
             },
-            "root-storage-size": {
+            "mtu": {
               "type": "integer"
             },
-            "root-storage-type": {
+            "no-auto-start": {
+              "type": "boolean"
+            },
+            "parent-interface-name": {
               "type": "string"
             },
-            "series": {
+            "provider-address-id": {
               "type": "string"
             },
-            "source": {
+            "provider-id": {
               "type": "string"
             },
-            "stream": {
+            "provider-space-id": {
               "type": "string"
             },
-            "version": {
+            "provider-subnet-id": {
               "type": "string"
             },
-            "virt-type": {
+            "provider-vlan-id": {
               "type": "string"
+            },
+            "routes": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/NetworkRoute"
+              }
+            },
+            "vlan-tag": {
+              "type": "integer"
             }
           },
           "additionalProperties": false,
           "required": [
-            "image-id",
-            "region",
-            "version",
-            "series",
-            "arch",
-            "source",
-            "priority"
+            "device-index",
+            "mac-address",
+            "cidr",
+            "mtu",
+            "provider-id",
+            "provider-subnet-id",
+            "provider-space-id",
+            "provider-address-id",
+            "provider-vlan-id",
+            "vlan-tag",
+            "interface-name",
+            "parent-interface-name",
+            "interface-type",
+            "disabled"
           ]
         },
-        "ConstraintsResult": {
+        "NetworkRoute": {
           "type": "object",
           "properties": {
-            "constraints": {
-              "$ref": "#/definitions/Value"
+            "destination-cidr": {
+              "type": "string"
             },
-            "error": {
-              "$ref": "#/definitions/Error"
+            "gateway-ip": {
+              "type": "string"
+            },
+            "metric": {
+              "type": "integer"
             }
           },
           "additionalProperties": false,
           "required": [
-            "constraints"
+            "destination-cidr",
+            "gateway-ip",
+            "metric"
           ]
         },
-        "ConstraintsResults": {
+        "NotifyWatchResult": {
           "type": "object",
           "properties": {
-            "results": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/ConstraintsResult"
-              }
+            "NotifyWatcherId": {
+              "type": "string"
+            },
+            "error": {
+              "$ref": "#/definitions/Error"
             }
           },
           "additionalProperties": false,
           "required": [
-            "results"
+            "NotifyWatcherId"
           ]
         },
-        "ContainerConfig": {
+        "Number": {
           "type": "object",
           "properties": {
-            "UpdateBehavior": {
-              "$ref": "#/definitions/UpdateBehavior"
+            "Build": {
+              "type": "integer"
             },
-            "apt-mirror": {
-              "type": "string"
+            "Major": {
+              "type": "integer"
             },
-            "apt-proxy": {
-              "$ref": "#/definitions/Settings"
+            "Minor": {
+              "type": "integer"
             },
-            "authorized-keys": {
-              "type": "string"
+            "Patch": {
+              "type": "integer"
             },
-            "provider-type": {
+            "Tag": {
               "type": "string"
-            },
-            "proxy": {
-              "$ref": "#/definitions/Settings"
-            },
-            "ssl-hostname-verification": {
-              "type": "boolean"
             }
           },
           "additionalProperties": false,
           "required": [
-            "provider-type",
-            "authorized-keys",
-            "ssl-hostname-verification",
-            "proxy",
-            "apt-proxy",
-            "apt-mirror",
-            "UpdateBehavior"
+            "Major",
+            "Minor",
+            "Tag",
+            "Patch",
+            "Build"
           ]
         },
-        "ContainerManagerConfig": {
+        "ProvisioningInfo": {
           "type": "object",
           "properties": {
-            "config": {
+            "constraints": {
+              "$ref": "#/definitions/Value"
+            },
+            "controller-config": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "object",
+                  "additionalProperties": true
+                }
+              }
+            },
+            "endpoint-bindings": {
               "type": "object",
               "patternProperties": {
                 ".*": {
                   "type": "string"
                 }
               }
-            }
-          },
-          "additionalProperties": false,
-          "required": [
-            "config"
-          ]
-        },
-        "ContainerManagerConfigParams": {
-          "type": "object",
-          "properties": {
-            "type": {
+            },
+            "image-metadata": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/CloudImageMetadata"
+              }
+            },
+            "jobs": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
+            "placement": {
               "type": "string"
-            }
-          },
-          "additionalProperties": false,
-          "required": [
-            "type"
-          ]
-        },
-        "ControllerConfigResult": {
-          "type": "object",
-          "properties": {
-            "config": {
+            },
+            "series": {
+              "type": "string"
+            },
+            "subnets-to-zones": {
               "type": "object",
               "patternProperties": {
                 ".*": {
-                  "type": "object",
-                  "additionalProperties": true
+                  "type": "array",
+                  "items": {
+                    "type": "string"
+                  }
+                }
+              }
+            },
+            "tags": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "string"
                 }
               }
+            },
+            "volumes": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/VolumeParams"
+              }
             }
           },
           "additionalProperties": false,
           "required": [
-            "config"
+            "constraints",
+            "series",
+            "placement",
+            "jobs"
           ]
         },
-        "DistributionGroupResult": {
+        "ProvisioningInfoResult": {
           "type": "object",
           "properties": {
             "error": {
               "$ref": "#/definitions/Error"
             },
             "result": {
-              "type": "array",
-              "items": {
-                "type": "string"
-              }
+              "$ref": "#/definitions/ProvisioningInfo"
             }
           },
           "additionalProperties": false,
             "result"
           ]
         },
-        "DistributionGroupResults": {
+        "ProvisioningInfoResults": {
           "type": "object",
           "properties": {
             "results": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/DistributionGroupResult"
+                "$ref": "#/definitions/ProvisioningInfoResult"
               }
             }
           },
             "results"
           ]
         },
-        "Entities": {
+        "SetMachineNetworkConfig": {
           "type": "object",
           "properties": {
-            "entities": {
+            "config": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/Entity"
+                "$ref": "#/definitions/NetworkConfig"
               }
+            },
+            "tag": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "entities"
+            "tag",
+            "config"
           ]
         },
-        "Entity": {
+        "SetStatus": {
           "type": "object",
           "properties": {
-            "tag": {
-              "type": "string"
+            "entities": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/EntityStatusArgs"
+              }
             }
           },
           "additionalProperties": false,
           "required": [
-            "tag"
+            "entities"
           ]
         },
-        "EntityPassword": {
+        "Settings": {
           "type": "object",
           "properties": {
-            "password": {
+            "Ftp": {
               "type": "string"
             },
-            "tag": {
+            "Http": {
+              "type": "string"
+            },
+            "Https": {
+              "type": "string"
+            },
+            "NoProxy": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "tag",
-            "password"
-          ]
-        },
-        "EntityPasswords": {
-          "type": "object",
-          "properties": {
-            "changes": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/EntityPassword"
-              }
-            }
-          },
-          "additionalProperties": false,
-          "required": [
-            "changes"
+            "Http",
+            "Https",
+            "Ftp",
+            "NoProxy"
           ]
         },
-        "EntityStatusArgs": {
+        "StatusResult": {
           "type": "object",
           "properties": {
             "data": {
                 }
               }
             },
+            "error": {
+              "$ref": "#/definitions/Error"
+            },
+            "id": {
+              "type": "string"
+            },
             "info": {
               "type": "string"
             },
-            "status": {
+            "life": {
               "type": "string"
             },
-            "tag": {
+            "since": {
+              "type": "string",
+              "format": "date-time"
+            },
+            "status": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "tag",
+            "id",
+            "life",
             "status",
             "info",
-            "data"
+            "data",
+            "since"
           ]
         },
-        "Error": {
+        "StatusResults": {
           "type": "object",
           "properties": {
-            "code": {
-              "type": "string"
-            },
-            "info": {
-              "$ref": "#/definitions/ErrorInfo"
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/StatusResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
+        "StringResult": {
+          "type": "object",
+          "properties": {
+            "error": {
+              "$ref": "#/definitions/Error"
             },
-            "message": {
+            "result": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "message",
-            "code"
+            "result"
           ]
         },
-        "ErrorInfo": {
+        "StringResults": {
           "type": "object",
           "properties": {
-            "macaroon": {
-              "$ref": "#/definitions/Macaroon"
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/StringResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
+        "StringsResult": {
+          "type": "object",
+          "properties": {
+            "error": {
+              "$ref": "#/definitions/Error"
             },
-            "macaroon-path": {
-              "type": "string"
+            "result": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
             }
           },
           "additionalProperties": false
         },
-        "ErrorResult": {
+        "StringsWatchResult": {
           "type": "object",
           "properties": {
+            "changes": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
             "error": {
               "$ref": "#/definitions/Error"
+            },
+            "watcher-id": {
+              "type": "string"
             }
           },
-          "additionalProperties": false
+          "additionalProperties": false,
+          "required": [
+            "watcher-id"
+          ]
         },
-        "ErrorResults": {
+        "StringsWatchResults": {
           "type": "object",
           "properties": {
             "results": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/ErrorResult"
+                "$ref": "#/definitions/StringsWatchResult"
               }
             }
           },
             "results"
           ]
         },
-        "FindToolsParams": {
+        "Tools": {
           "type": "object",
           "properties": {
-            "arch": {
+            "sha256": {
               "type": "string"
             },
-            "major": {
-              "type": "integer"
-            },
-            "minor": {
+            "size": {
               "type": "integer"
             },
-            "number": {
-              "$ref": "#/definitions/Number"
-            },
-            "series": {
+            "url": {
               "type": "string"
+            },
+            "version": {
+              "$ref": "#/definitions/Binary"
             }
           },
           "additionalProperties": false,
           "required": [
-            "number",
-            "major",
-            "minor",
-            "arch",
-            "series"
+            "version",
+            "url",
+            "size"
           ]
         },
-        "FindToolsResult": {
+        "ToolsResult": {
           "type": "object",
           "properties": {
+            "disable-ssl-hostname-verification": {
+              "type": "boolean"
+            },
             "error": {
               "$ref": "#/definitions/Error"
             },
-            "list": {
+            "tools": {
               "type": "array",
               "items": {
                 "$ref": "#/definitions/Tools"
           },
           "additionalProperties": false,
           "required": [
-            "list"
+            "tools",
+            "disable-ssl-hostname-verification"
           ]
         },
-        "HardwareCharacteristics": {
+        "ToolsResults": {
+          "type": "object",
+          "properties": {
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/ToolsResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
+        "UpdateBehavior": {
+          "type": "object",
+          "properties": {
+            "enable-os-refresh-update": {
+              "type": "boolean"
+            },
+            "enable-os-upgrade": {
+              "type": "boolean"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "enable-os-refresh-update",
+            "enable-os-upgrade"
+          ]
+        },
+        "Value": {
           "type": "object",
           "properties": {
             "arch": {
               "type": "string"
             },
-            "availability-zone": {
+            "container": {
               "type": "string"
             },
-            "cpu-cores": {
+            "cores": {
               "type": "integer"
             },
             "cpu-power": {
               "type": "integer"
             },
+            "instance-type": {
+              "type": "string"
+            },
             "mem": {
               "type": "integer"
             },
             "root-disk": {
               "type": "integer"
             },
+            "spaces": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            },
             "tags": {
               "type": "array",
               "items": {
                 "type": "string"
               }
+            },
+            "virt-type": {
+              "type": "string"
             }
           },
           "additionalProperties": false
         },
-        "HostPort": {
+        "Volume": {
           "type": "object",
           "properties": {
-            "Address": {
-              "$ref": "#/definitions/Address"
+            "info": {
+              "$ref": "#/definitions/VolumeInfo"
             },
-            "port": {
-              "type": "integer"
+            "volume-tag": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "Address",
-            "port"
+            "volume-tag",
+            "info"
           ]
         },
-        "InstanceInfo": {
+        "VolumeAttachmentInfo": {
           "type": "object",
           "properties": {
-            "characteristics": {
-              "$ref": "#/definitions/HardwareCharacteristics"
-            },
-            "instance-id": {
+            "bus-address": {
               "type": "string"
             },
-            "network-config": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/NetworkConfig"
-              }
-            },
-            "nonce": {
+            "device-link": {
               "type": "string"
             },
-            "tag": {
+            "device-name": {
               "type": "string"
             },
-            "volume-attachments": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "$ref": "#/definitions/VolumeAttachmentInfo"
-                }
-              }
-            },
-            "volumes": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/Volume"
-              }
+            "read-only": {
+              "type": "boolean"
             }
           },
-          "additionalProperties": false,
-          "required": [
-            "tag",
-            "instance-id",
-            "nonce",
-            "characteristics",
-            "volumes",
-            "volume-attachments",
-            "network-config"
-          ]
+          "additionalProperties": false
         },
-        "InstancesInfo": {
+        "VolumeAttachmentParams": {
           "type": "object",
-          "properties": {
-            "machines": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/InstanceInfo"
-              }
+          "properties": {
+            "instance-id": {
+              "type": "string"
+            },
+            "machine-tag": {
+              "type": "string"
+            },
+            "provider": {
+              "type": "string"
+            },
+            "read-only": {
+              "type": "boolean"
+            },
+            "volume-id": {
+              "type": "string"
+            },
+            "volume-tag": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "machines"
+            "volume-tag",
+            "machine-tag",
+            "provider"
           ]
         },
-        "LifeResult": {
+        "VolumeInfo": {
           "type": "object",
           "properties": {
-            "error": {
-              "$ref": "#/definitions/Error"
+            "hardware-id": {
+              "type": "string"
             },
-            "life": {
+            "persistent": {
+              "type": "boolean"
+            },
+            "size": {
+              "type": "integer"
+            },
+            "volume-id": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "life"
+            "volume-id",
+            "size",
+            "persistent"
           ]
         },
-        "LifeResults": {
+        "VolumeParams": {
           "type": "object",
           "properties": {
-            "results": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/LifeResult"
+            "attachment": {
+              "$ref": "#/definitions/VolumeAttachmentParams"
+            },
+            "attributes": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "object",
+                  "additionalProperties": true
+                }
+              }
+            },
+            "provider": {
+              "type": "string"
+            },
+            "size": {
+              "type": "integer"
+            },
+            "tags": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "string"
+                }
               }
+            },
+            "volume-tag": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "results"
+            "volume-tag",
+            "size",
+            "provider"
           ]
         },
-        "Macaroon": {
-          "type": "object",
-          "additionalProperties": false
-        },
-        "MachineContainers": {
+        "WatchContainer": {
           "type": "object",
           "properties": {
-            "container-types": {
-              "type": "array",
-              "items": {
-                "type": "string"
-              }
+            "container-type": {
+              "type": "string"
             },
             "machine-tag": {
               "type": "string"
           "additionalProperties": false,
           "required": [
             "machine-tag",
-            "container-types"
+            "container-type"
           ]
         },
-        "MachineContainersParams": {
+        "WatchContainers": {
           "type": "object",
           "properties": {
             "params": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/MachineContainers"
+                "$ref": "#/definitions/WatchContainer"
               }
             }
           },
           "required": [
             "params"
           ]
-        },
-        "MachineNetworkConfigResult": {
+        }
+      }
+    }
+  },
+  {
+    "Name": "ProxyUpdater",
+    "Version": 1,
+    "Schema": {
+      "type": "object",
+      "properties": {
+        "ProxyConfig": {
           "type": "object",
           "properties": {
-            "error": {
-              "$ref": "#/definitions/Error"
+            "Params": {
+              "$ref": "#/definitions/Entities"
             },
-            "info": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/NetworkConfig"
-              }
+            "Result": {
+              "$ref": "#/definitions/ProxyConfigResults"
             }
-          },
-          "additionalProperties": false,
-          "required": [
-            "info"
-          ]
+          }
         },
-        "MachineNetworkConfigResults": {
+        "WatchForProxyConfigAndAPIHostPortChanges": {
           "type": "object",
           "properties": {
-            "results": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
+            },
+            "Result": {
+              "$ref": "#/definitions/NotifyWatchResults"
+            }
+          }
+        }
+      },
+      "definitions": {
+        "Entities": {
+          "type": "object",
+          "properties": {
+            "entities": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/MachineNetworkConfigResult"
+                "$ref": "#/definitions/Entity"
               }
             }
           },
           "additionalProperties": false,
           "required": [
-            "results"
+            "entities"
           ]
         },
-        "ModelConfigResult": {
+        "Entity": {
           "type": "object",
           "properties": {
-            "config": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "type": "object",
-                  "additionalProperties": true
-                }
-              }
+            "tag": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "config"
+            "tag"
           ]
         },
-        "NetworkConfig": {
+        "Error": {
           "type": "object",
           "properties": {
-            "address": {
-              "type": "string"
-            },
-            "cidr": {
-              "type": "string"
-            },
-            "config-type": {
-              "type": "string"
-            },
-            "device-index": {
-              "type": "integer"
-            },
-            "disabled": {
-              "type": "boolean"
-            },
-            "dns-search-domains": {
-              "type": "array",
-              "items": {
-                "type": "string"
-              }
-            },
-            "dns-servers": {
-              "type": "array",
-              "items": {
-                "type": "string"
-              }
-            },
-            "gateway-address": {
-              "type": "string"
-            },
-            "interface-name": {
-              "type": "string"
-            },
-            "interface-type": {
-              "type": "string"
-            },
-            "mac-address": {
-              "type": "string"
-            },
-            "mtu": {
-              "type": "integer"
-            },
-            "no-auto-start": {
-              "type": "boolean"
-            },
-            "parent-interface-name": {
-              "type": "string"
-            },
-            "provider-address-id": {
-              "type": "string"
-            },
-            "provider-id": {
-              "type": "string"
-            },
-            "provider-space-id": {
+            "code": {
               "type": "string"
             },
-            "provider-subnet-id": {
-              "type": "string"
+            "info": {
+              "$ref": "#/definitions/ErrorInfo"
             },
-            "provider-vlan-id": {
+            "message": {
               "type": "string"
-            },
-            "vlan-tag": {
-              "type": "integer"
             }
           },
           "additionalProperties": false,
           "required": [
-            "device-index",
-            "mac-address",
-            "cidr",
-            "mtu",
-            "provider-id",
-            "provider-subnet-id",
-            "provider-space-id",
-            "provider-address-id",
-            "provider-vlan-id",
-            "vlan-tag",
-            "interface-name",
-            "parent-interface-name",
-            "interface-type",
-            "disabled"
+            "message",
+            "code"
           ]
         },
+        "ErrorInfo": {
+          "type": "object",
+          "properties": {
+            "macaroon": {
+              "$ref": "#/definitions/Macaroon"
+            },
+            "macaroon-path": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false
+        },
+        "Macaroon": {
+          "type": "object",
+          "additionalProperties": false
+        },
         "NotifyWatchResult": {
           "type": "object",
           "properties": {
             "NotifyWatcherId"
           ]
         },
-        "Number": {
+        "NotifyWatchResults": {
           "type": "object",
           "properties": {
-            "Build": {
-              "type": "integer"
-            },
-            "Major": {
-              "type": "integer"
-            },
-            "Minor": {
-              "type": "integer"
-            },
-            "Patch": {
-              "type": "integer"
-            },
-            "Tag": {
-              "type": "string"
+            "results": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/NotifyWatchResult"
+              }
             }
           },
           "additionalProperties": false,
           "required": [
-            "Major",
-            "Minor",
-            "Tag",
-            "Patch",
-            "Build"
+            "results"
           ]
         },
-        "ProvisioningInfo": {
+        "ProxyConfig": {
           "type": "object",
           "properties": {
-            "constraints": {
-              "$ref": "#/definitions/Value"
-            },
-            "controller-config": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "type": "object",
-                  "additionalProperties": true
-                }
-              }
-            },
-            "endpoint-bindings": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "type": "string"
-                }
-              }
-            },
-            "image-metadata": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/CloudImageMetadata"
-              }
-            },
-            "jobs": {
-              "type": "array",
-              "items": {
-                "type": "string"
-              }
-            },
-            "placement": {
+            "ftp": {
               "type": "string"
             },
-            "series": {
+            "http": {
               "type": "string"
             },
-            "subnets-to-zones": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "type": "array",
-                  "items": {
-                    "type": "string"
-                  }
-                }
-              }
-            },
-            "tags": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "type": "string"
-                }
-              }
+            "https": {
+              "type": "string"
             },
-            "volumes": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/VolumeParams"
-              }
+            "no-proxy": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "constraints",
-            "series",
-            "placement",
-            "jobs"
+            "http",
+            "https",
+            "ftp",
+            "no-proxy"
           ]
         },
-        "ProvisioningInfoResult": {
+        "ProxyConfigResult": {
           "type": "object",
           "properties": {
+            "apt-proxy-settings": {
+              "$ref": "#/definitions/ProxyConfig"
+            },
             "error": {
               "$ref": "#/definitions/Error"
             },
-            "result": {
-              "$ref": "#/definitions/ProvisioningInfo"
+            "proxy-settings": {
+              "$ref": "#/definitions/ProxyConfig"
             }
           },
           "additionalProperties": false,
           "required": [
-            "result"
+            "proxy-settings",
+            "apt-proxy-settings"
           ]
         },
-        "ProvisioningInfoResults": {
+        "ProxyConfigResults": {
           "type": "object",
           "properties": {
             "results": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/ProvisioningInfoResult"
+                "$ref": "#/definitions/ProxyConfigResult"
               }
             }
           },
           "required": [
             "results"
           ]
+        }
+      }
+    }
+  },
+  {
+    "Name": "Reboot",
+    "Version": 2,
+    "Schema": {
+      "type": "object",
+      "properties": {
+        "ClearReboot": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
+            },
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
+            }
+          }
         },
-        "SetStatus": {
+        "GetRebootAction": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
+            },
+            "Result": {
+              "$ref": "#/definitions/RebootActionResults"
+            }
+          }
+        },
+        "RequestReboot": {
+          "type": "object",
+          "properties": {
+            "Params": {
+              "$ref": "#/definitions/Entities"
+            },
+            "Result": {
+              "$ref": "#/definitions/ErrorResults"
+            }
+          }
+        },
+        "WatchForRebootEvent": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/NotifyWatchResult"
+            }
+          }
+        }
+      },
+      "definitions": {
+        "Entities": {
           "type": "object",
           "properties": {
             "entities": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/EntityStatusArgs"
+                "$ref": "#/definitions/Entity"
               }
             }
           },
             "entities"
           ]
         },
-        "Settings": {
+        "Entity": {
           "type": "object",
           "properties": {
-            "Ftp": {
-              "type": "string"
-            },
-            "Http": {
-              "type": "string"
-            },
-            "Https": {
-              "type": "string"
-            },
-            "NoProxy": {
+            "tag": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "Http",
-            "Https",
-            "Ftp",
-            "NoProxy"
+            "tag"
           ]
         },
-        "StatusResult": {
+        "Error": {
           "type": "object",
           "properties": {
-            "data": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "type": "object",
-                  "additionalProperties": true
-                }
-              }
-            },
-            "error": {
-              "$ref": "#/definitions/Error"
-            },
-            "id": {
+            "code": {
               "type": "string"
             },
             "info": {
-              "type": "string"
-            },
-            "life": {
-              "type": "string"
-            },
-            "since": {
-              "type": "string",
-              "format": "date-time"
+              "$ref": "#/definitions/ErrorInfo"
             },
-            "status": {
+            "message": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "id",
-            "life",
-            "status",
-            "info",
-            "data",
-            "since"
+            "message",
+            "code"
           ]
         },
-        "StatusResults": {
+        "ErrorInfo": {
           "type": "object",
           "properties": {
-            "results": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/StatusResult"
-              }
+            "macaroon": {
+              "$ref": "#/definitions/Macaroon"
+            },
+            "macaroon-path": {
+              "type": "string"
             }
           },
-          "additionalProperties": false,
-          "required": [
-            "results"
-          ]
+          "additionalProperties": false
         },
-        "StringResult": {
+        "ErrorResult": {
           "type": "object",
           "properties": {
             "error": {
               "$ref": "#/definitions/Error"
-            },
-            "result": {
-              "type": "string"
             }
           },
-          "additionalProperties": false,
-          "required": [
-            "result"
-          ]
+          "additionalProperties": false
         },
-        "StringResults": {
+        "ErrorResults": {
           "type": "object",
           "properties": {
             "results": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/StringResult"
+                "$ref": "#/definitions/ErrorResult"
               }
             }
           },
             "results"
           ]
         },
-        "StringsResult": {
+        "Macaroon": {
+          "type": "object",
+          "additionalProperties": false
+        },
+        "NotifyWatchResult": {
           "type": "object",
           "properties": {
+            "NotifyWatcherId": {
+              "type": "string"
+            },
             "error": {
               "$ref": "#/definitions/Error"
-            },
-            "result": {
-              "type": "array",
-              "items": {
-                "type": "string"
-              }
             }
           },
-          "additionalProperties": false
+          "additionalProperties": false,
+          "required": [
+            "NotifyWatcherId"
+          ]
         },
-        "StringsWatchResult": {
+        "RebootActionResult": {
           "type": "object",
           "properties": {
-            "changes": {
-              "type": "array",
-              "items": {
-                "type": "string"
-              }
-            },
             "error": {
               "$ref": "#/definitions/Error"
             },
-            "watcher-id": {
+            "result": {
               "type": "string"
             }
           },
-          "additionalProperties": false,
-          "required": [
-            "watcher-id"
-          ]
+          "additionalProperties": false
         },
-        "StringsWatchResults": {
+        "RebootActionResults": {
           "type": "object",
           "properties": {
             "results": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/StringsWatchResult"
+                "$ref": "#/definitions/RebootActionResult"
               }
             }
           },
-          "additionalProperties": false,
-          "required": [
-            "results"
-          ]
+          "additionalProperties": false
+        }
+      }
+    }
+  },
+  {
+    "Name": "RelationUnitsWatcher",
+    "Version": 1,
+    "Schema": {
+      "type": "object",
+      "properties": {
+        "Next": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/RelationUnitsWatchResult"
+            }
+          }
         },
-        "Tools": {
+        "Stop": {
+          "type": "object"
+        }
+      },
+      "definitions": {
+        "Error": {
           "type": "object",
           "properties": {
-            "sha256": {
+            "code": {
               "type": "string"
             },
-            "size": {
-              "type": "integer"
+            "info": {
+              "$ref": "#/definitions/ErrorInfo"
             },
-            "url": {
+            "message": {
               "type": "string"
-            },
-            "version": {
-              "$ref": "#/definitions/Binary"
             }
           },
           "additionalProperties": false,
           "required": [
-            "version",
-            "url",
-            "size"
+            "message",
+            "code"
           ]
         },
-        "ToolsResult": {
+        "ErrorInfo": {
           "type": "object",
           "properties": {
-            "disable-ssl-hostname-verification": {
-              "type": "boolean"
-            },
-            "error": {
-              "$ref": "#/definitions/Error"
+            "macaroon": {
+              "$ref": "#/definitions/Macaroon"
             },
-            "tools": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/Tools"
-              }
+            "macaroon-path": {
+              "type": "string"
             }
           },
-          "additionalProperties": false,
-          "required": [
-            "tools",
-            "disable-ssl-hostname-verification"
-          ]
+          "additionalProperties": false
         },
-        "ToolsResults": {
+        "Macaroon": {
+          "type": "object",
+          "additionalProperties": false
+        },
+        "RelationUnitsChange": {
           "type": "object",
           "properties": {
-            "results": {
+            "changed": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "$ref": "#/definitions/UnitSettings"
+                }
+              }
+            },
+            "departed": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/ToolsResult"
+                "type": "string"
               }
             }
           },
           "additionalProperties": false,
           "required": [
-            "results"
+            "changed"
           ]
         },
-        "UpdateBehavior": {
+        "RelationUnitsWatchResult": {
           "type": "object",
           "properties": {
-            "enable-os-refresh-update": {
-              "type": "boolean"
+            "changes": {
+              "$ref": "#/definitions/RelationUnitsChange"
             },
-            "enable-os-upgrade": {
-              "type": "boolean"
+            "error": {
+              "$ref": "#/definitions/Error"
+            },
+            "watcher-id": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "enable-os-refresh-update",
-            "enable-os-upgrade"
+            "watcher-id",
+            "changes"
           ]
         },
-        "Value": {
+        "UnitSettings": {
           "type": "object",
           "properties": {
-            "arch": {
-              "type": "string"
-            },
-            "container": {
-              "type": "string"
-            },
-            "cores": {
-              "type": "integer"
-            },
-            "cpu-power": {
-              "type": "integer"
-            },
-            "instance-type": {
-              "type": "string"
-            },
-            "mem": {
-              "type": "integer"
-            },
-            "root-disk": {
+            "version": {
               "type": "integer"
-            },
-            "spaces": {
-              "type": "array",
-              "items": {
-                "type": "string"
-              }
-            },
-            "tags": {
-              "type": "array",
-              "items": {
-                "type": "string"
-              }
-            },
-            "virt-type": {
-              "type": "string"
             }
           },
-          "additionalProperties": false
+          "additionalProperties": false,
+          "required": [
+            "version"
+          ]
+        }
+      }
+    }
+  },
+  {
+    "Name": "RemoteApplicationWatcher",
+    "Version": 1,
+    "Schema": {
+      "type": "object",
+      "properties": {
+        "Next": {
+          "type": "object",
+          "properties": {
+            "Result": {
+              "$ref": "#/definitions/RemoteApplicationWatchResult"
+            }
+          }
         },
-        "Volume": {
+        "Stop": {
+          "type": "object"
+        }
+      },
+      "definitions": {
+        "Error": {
           "type": "object",
           "properties": {
+            "code": {
+              "type": "string"
+            },
             "info": {
-              "$ref": "#/definitions/VolumeInfo"
+              "$ref": "#/definitions/ErrorInfo"
             },
-            "volume-tag": {
+            "message": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "volume-tag",
-            "info"
+            "message",
+            "code"
           ]
         },
-        "VolumeAttachmentInfo": {
+        "ErrorInfo": {
           "type": "object",
           "properties": {
-            "bus-address": {
-              "type": "string"
-            },
-            "device-link": {
-              "type": "string"
+            "macaroon": {
+              "$ref": "#/definitions/Macaroon"
             },
-            "device-name": {
+            "macaroon-path": {
               "type": "string"
-            },
-            "read-only": {
-              "type": "boolean"
             }
           },
           "additionalProperties": false
         },
-        "VolumeAttachmentParams": {
+        "Macaroon": {
+          "type": "object",
+          "additionalProperties": false
+        },
+        "RemoteApplicationChange": {
           "type": "object",
           "properties": {
-            "instance-id": {
-              "type": "string"
-            },
-            "machine-tag": {
+            "application-tag": {
               "type": "string"
             },
-            "provider": {
+            "life": {
               "type": "string"
             },
-            "read-only": {
-              "type": "boolean"
+            "relations": {
+              "$ref": "#/definitions/RemoteRelationsChange"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "application-tag",
+            "life",
+            "relations"
+          ]
+        },
+        "RemoteApplicationWatchResult": {
+          "type": "object",
+          "properties": {
+            "change": {
+              "$ref": "#/definitions/RemoteApplicationChange"
             },
-            "volume-id": {
-              "type": "string"
+            "error": {
+              "$ref": "#/definitions/Error"
             },
-            "volume-tag": {
+            "id": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "volume-tag",
-            "machine-tag",
-            "provider"
+            "id"
           ]
         },
-        "VolumeInfo": {
+        "RemoteEntityId": {
           "type": "object",
           "properties": {
-            "hardware-id": {
+            "model-uuid": {
               "type": "string"
             },
-            "persistent": {
-              "type": "boolean"
-            },
-            "size": {
-              "type": "integer"
-            },
-            "volume-id": {
+            "token": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "volume-id",
-            "size",
-            "persistent"
+            "model-uuid",
+            "token"
           ]
         },
-        "VolumeParams": {
+        "RemoteRelationChange": {
           "type": "object",
           "properties": {
-            "attachment": {
-              "$ref": "#/definitions/VolumeAttachmentParams"
-            },
-            "attributes": {
+            "changed-units": {
               "type": "object",
               "patternProperties": {
                 ".*": {
-                  "type": "object",
-                  "additionalProperties": true
+                  "$ref": "#/definitions/RemoteRelationUnitChange"
                 }
               }
             },
-            "provider": {
-              "type": "string"
+            "departed-units": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
             },
-            "size": {
+            "id": {
               "type": "integer"
             },
-            "tags": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "type": "string"
-                }
-              }
-            },
-            "volume-tag": {
+            "life": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "volume-tag",
-            "size",
-            "provider"
+            "id",
+            "life"
           ]
         },
-        "WatchContainer": {
+        "RemoteRelationUnitChange": {
           "type": "object",
           "properties": {
-            "container-type": {
-              "type": "string"
+            "settings": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "object",
+                  "additionalProperties": true
+                }
+              }
             },
-            "machine-tag": {
-              "type": "string"
+            "unit-id": {
+              "$ref": "#/definitions/RemoteEntityId"
             }
           },
           "additionalProperties": false,
           "required": [
-            "machine-tag",
-            "container-type"
+            "unit-id"
           ]
         },
-        "WatchContainers": {
+        "RemoteRelationsChange": {
           "type": "object",
           "properties": {
-            "params": {
+            "changed": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/WatchContainer"
+                "$ref": "#/definitions/RemoteRelationChange"
+              }
+            },
+            "initial": {
+              "type": "boolean"
+            },
+            "removed": {
+              "type": "array",
+              "items": {
+                "type": "integer"
               }
             }
           },
           "additionalProperties": false,
           "required": [
-            "params"
+            "initial"
           ]
         }
       }
     }
   },
   {
-    "Name": "ProxyUpdater",
+    "Name": "RemoteRelationsWatcher",
     "Version": 1,
     "Schema": {
       "type": "object",
       "properties": {
-        "ProxyConfig": {
+        "Next": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
-            },
             "Result": {
-              "$ref": "#/definitions/ProxyConfigResults"
+              "$ref": "#/definitions/RemoteRelationsWatchResult"
             }
           }
         },
-        "WatchForProxyConfigAndAPIHostPortChanges": {
-          "type": "object",
-          "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
-            },
-            "Result": {
-              "$ref": "#/definitions/NotifyWatchResults"
-            }
-          }
+        "Stop": {
+          "type": "object"
         }
       },
       "definitions": {
-        "Entities": {
-          "type": "object",
-          "properties": {
-            "entities": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/Entity"
-              }
-            }
-          },
-          "additionalProperties": false,
-          "required": [
-            "entities"
-          ]
-        },
-        "Entity": {
-          "type": "object",
-          "properties": {
-            "tag": {
-              "type": "string"
-            }
-          },
-          "additionalProperties": false,
-          "required": [
-            "tag"
-          ]
-        },
         "Error": {
           "type": "object",
           "properties": {
           "type": "object",
           "additionalProperties": false
         },
-        "NotifyWatchResult": {
+        "RemoteEntityId": {
           "type": "object",
           "properties": {
-            "NotifyWatcherId": {
+            "model-uuid": {
               "type": "string"
             },
-            "error": {
-              "$ref": "#/definitions/Error"
+            "token": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "NotifyWatcherId"
+            "model-uuid",
+            "token"
           ]
         },
-        "NotifyWatchResults": {
+        "RemoteRelationChange": {
           "type": "object",
           "properties": {
-            "results": {
+            "changed-units": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "$ref": "#/definitions/RemoteRelationUnitChange"
+                }
+              }
+            },
+            "departed-units": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/NotifyWatchResult"
+                "type": "string"
               }
+            },
+            "id": {
+              "type": "integer"
+            },
+            "life": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "results"
+            "id",
+            "life"
           ]
         },
-        "ProxyConfig": {
+        "RemoteRelationUnitChange": {
           "type": "object",
           "properties": {
-            "ftp": {
-              "type": "string"
-            },
-            "http": {
-              "type": "string"
-            },
-            "https": {
-              "type": "string"
+            "settings": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "object",
+                  "additionalProperties": true
+                }
+              }
             },
-            "no-proxy": {
-              "type": "string"
+            "unit-id": {
+              "$ref": "#/definitions/RemoteEntityId"
             }
           },
           "additionalProperties": false,
           "required": [
-            "http",
-            "https",
-            "ftp",
-            "no-proxy"
+            "unit-id"
           ]
         },
-        "ProxyConfigResult": {
+        "RemoteRelationsChange": {
           "type": "object",
           "properties": {
-            "apt-proxy-settings": {
-              "$ref": "#/definitions/ProxyConfig"
+            "changed": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/RemoteRelationChange"
+              }
             },
-            "error": {
-              "$ref": "#/definitions/Error"
+            "initial": {
+              "type": "boolean"
             },
-            "proxy-settings": {
-              "$ref": "#/definitions/ProxyConfig"
+            "removed": {
+              "type": "array",
+              "items": {
+                "type": "integer"
+              }
             }
           },
           "additionalProperties": false,
           "required": [
-            "proxy-settings",
-            "apt-proxy-settings"
+            "initial"
           ]
         },
-        "ProxyConfigResults": {
+        "RemoteRelationsWatchResult": {
           "type": "object",
           "properties": {
-            "results": {
-              "type": "array",
-              "items": {
-                "$ref": "#/definitions/ProxyConfigResult"
-              }
+            "RemoteRelationsWatcherId": {
+              "type": "string"
+            },
+            "change": {
+              "$ref": "#/definitions/RemoteRelationsChange"
+            },
+            "error": {
+              "$ref": "#/definitions/Error"
             }
           },
           "additionalProperties": false,
           "required": [
-            "results"
+            "RemoteRelationsWatcherId"
           ]
         }
       }
     }
   },
   {
-    "Name": "Reboot",
-    "Version": 2,
+    "Name": "Resources",
+    "Version": 1,
     "Schema": {
       "type": "object",
       "properties": {
-        "ClearReboot": {
+        "AddPendingResources": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/Entities"
+              "$ref": "#/definitions/AddPendingResourcesArgs"
             },
             "Result": {
-              "$ref": "#/definitions/ErrorResults"
+              "$ref": "#/definitions/AddPendingResourcesResult"
             }
           }
         },
-        "GetRebootAction": {
+        "ListResources": {
           "type": "object",
           "properties": {
             "Params": {
-              "$ref": "#/definitions/Entities"
+              "$ref": "#/definitions/ListResourcesArgs"
             },
             "Result": {
-              "$ref": "#/definitions/RebootActionResults"
+              "$ref": "#/definitions/ResourcesResults"
             }
           }
+        }
+      },
+      "definitions": {
+        "AddCharmWithAuthorization": {
+          "type": "object",
+          "properties": {
+            "channel": {
+              "type": "string"
+            },
+            "macaroon": {
+              "$ref": "#/definitions/Macaroon"
+            },
+            "url": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "url",
+            "channel",
+            "macaroon"
+          ]
         },
-        "RequestReboot": {
+        "AddPendingResourcesArgs": {
           "type": "object",
           "properties": {
-            "Params": {
-              "$ref": "#/definitions/Entities"
+            "AddCharmWithAuthorization": {
+              "$ref": "#/definitions/AddCharmWithAuthorization"
             },
-            "Result": {
-              "$ref": "#/definitions/ErrorResults"
+            "Entity": {
+              "$ref": "#/definitions/Entity"
+            },
+            "Resources": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/CharmResource"
+              }
             }
-          }
+          },
+          "additionalProperties": false,
+          "required": [
+            "Entity",
+            "AddCharmWithAuthorization",
+            "Resources"
+          ]
         },
-        "WatchForRebootEvent": {
+        "AddPendingResourcesResult": {
           "type": "object",
           "properties": {
-            "Result": {
-              "$ref": "#/definitions/NotifyWatchResult"
+            "ErrorResult": {
+              "$ref": "#/definitions/ErrorResult"
+            },
+            "pending-ids": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
             }
-          }
-        }
-      },
-      "definitions": {
-        "Entities": {
+          },
+          "additionalProperties": false,
+          "required": [
+            "ErrorResult",
+            "pending-ids"
+          ]
+        },
+        "CharmResource": {
           "type": "object",
           "properties": {
-            "entities": {
+            "description": {
+              "type": "string"
+            },
+            "fingerprint": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/Entity"
+                "type": "integer"
               }
+            },
+            "name": {
+              "type": "string"
+            },
+            "origin": {
+              "type": "string"
+            },
+            "path": {
+              "type": "string"
+            },
+            "revision": {
+              "type": "integer"
+            },
+            "size": {
+              "type": "integer"
+            },
+            "type": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "entities"
+            "name",
+            "type",
+            "path",
+            "origin",
+            "revision",
+            "fingerprint",
+            "size"
           ]
         },
         "Entity": {
           },
           "additionalProperties": false
         },
-        "ErrorResults": {
+        "ListResourcesArgs": {
           "type": "object",
           "properties": {
-            "results": {
+            "entities": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/ErrorResult"
+                "$ref": "#/definitions/Entity"
               }
             }
           },
           "additionalProperties": false,
           "required": [
-            "results"
+            "entities"
           ]
         },
         "Macaroon": {
           "type": "object",
           "additionalProperties": false
         },
-        "NotifyWatchResult": {
+        "Resource": {
           "type": "object",
           "properties": {
-            "NotifyWatcherId": {
+            "CharmResource": {
+              "$ref": "#/definitions/CharmResource"
+            },
+            "application": {
               "type": "string"
             },
-            "error": {
-              "$ref": "#/definitions/Error"
+            "id": {
+              "type": "string"
+            },
+            "pending-id": {
+              "type": "string"
+            },
+            "timestamp": {
+              "type": "string",
+              "format": "date-time"
+            },
+            "username": {
+              "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "NotifyWatcherId"
+            "CharmResource",
+            "id",
+            "pending-id",
+            "application",
+            "username",
+            "timestamp"
           ]
         },
-        "RebootActionResult": {
+        "ResourcesResult": {
           "type": "object",
           "properties": {
-            "error": {
-              "$ref": "#/definitions/Error"
+            "ErrorResult": {
+              "$ref": "#/definitions/ErrorResult"
             },
-            "result": {
-              "type": "string"
+            "charm-store-resources": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/CharmResource"
+              }
+            },
+            "resources": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/Resource"
+              }
+            },
+            "unit-resources": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/UnitResources"
+              }
             }
           },
-          "additionalProperties": false
+          "additionalProperties": false,
+          "required": [
+            "ErrorResult",
+            "resources",
+            "charm-store-resources",
+            "unit-resources"
+          ]
         },
-        "RebootActionResults": {
+        "ResourcesResults": {
           "type": "object",
           "properties": {
             "results": {
               "type": "array",
               "items": {
-                "$ref": "#/definitions/RebootActionResult"
+                "$ref": "#/definitions/ResourcesResult"
               }
             }
           },
-          "additionalProperties": false
+          "additionalProperties": false,
+          "required": [
+            "results"
+          ]
+        },
+        "UnitResources": {
+          "type": "object",
+          "properties": {
+            "Entity": {
+              "$ref": "#/definitions/Entity"
+            },
+            "download-progress": {
+              "type": "object",
+              "patternProperties": {
+                ".*": {
+                  "type": "integer"
+                }
+              }
+            },
+            "resources": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/Resource"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "Entity",
+            "resources",
+            "download-progress"
+          ]
         }
       }
     }
   },
   {
-    "Name": "RelationUnitsWatcher",
+    "Name": "ResourcesHookContext",
     "Version": 1,
     "Schema": {
       "type": "object",
       "properties": {
-        "Next": {
+        "GetResourceInfo": {
           "type": "object",
           "properties": {
+            "Params": {
+              "$ref": "#/definitions/ListResourcesArgs"
+            },
             "Result": {
-              "$ref": "#/definitions/RelationUnitsWatchResult"
+              "$ref": "#/definitions/ResourcesResult"
             }
           }
-        },
-        "Stop": {
-          "type": "object"
         }
       },
       "definitions": {
+        "CharmResource": {
+          "type": "object",
+          "properties": {
+            "description": {
+              "type": "string"
+            },
+            "fingerprint": {
+              "type": "array",
+              "items": {
+                "type": "integer"
+              }
+            },
+            "name": {
+              "type": "string"
+            },
+            "origin": {
+              "type": "string"
+            },
+            "path": {
+              "type": "string"
+            },
+            "revision": {
+              "type": "integer"
+            },
+            "size": {
+              "type": "integer"
+            },
+            "type": {
+              "type": "string"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "name",
+            "type",
+            "path",
+            "origin",
+            "revision",
+            "fingerprint",
+            "size"
+          ]
+        },
         "Error": {
           "type": "object",
           "properties": {
           },
           "additionalProperties": false
         },
-        "Macaroon": {
+        "ErrorResult": {
           "type": "object",
+          "properties": {
+            "error": {
+              "$ref": "#/definitions/Error"
+            }
+          },
           "additionalProperties": false
         },
-        "RelationUnitsChange": {
+        "ListResourcesArgs": {
           "type": "object",
           "properties": {
-            "changed": {
-              "type": "object",
-              "patternProperties": {
-                ".*": {
-                  "$ref": "#/definitions/UnitSettings"
-                }
-              }
-            },
-            "departed": {
+            "resource-names": {
               "type": "array",
               "items": {
                 "type": "string"
           },
           "additionalProperties": false,
           "required": [
-            "changed"
+            "resource-names"
           ]
         },
-        "RelationUnitsWatchResult": {
+        "Macaroon": {
+          "type": "object",
+          "additionalProperties": false
+        },
+        "Resource": {
           "type": "object",
           "properties": {
-            "changes": {
-              "$ref": "#/definitions/RelationUnitsChange"
+            "CharmResource": {
+              "$ref": "#/definitions/CharmResource"
             },
-            "error": {
-              "$ref": "#/definitions/Error"
+            "application": {
+              "type": "string"
             },
-            "watcher-id": {
+            "id": {
+              "type": "string"
+            },
+            "pending-id": {
+              "type": "string"
+            },
+            "timestamp": {
+              "type": "string",
+              "format": "date-time"
+            },
+            "username": {
               "type": "string"
             }
           },
           "additionalProperties": false,
           "required": [
-            "watcher-id",
-            "changes"
+            "CharmResource",
+            "id",
+            "pending-id",
+            "application",
+            "username",
+            "timestamp"
           ]
         },
-        "UnitSettings": {
+        "ResourceResult": {
           "type": "object",
           "properties": {
-            "version": {
-              "type": "integer"
+            "ErrorResult": {
+              "$ref": "#/definitions/ErrorResult"
+            },
+            "resource": {
+              "$ref": "#/definitions/Resource"
             }
           },
           "additionalProperties": false,
           "required": [
-            "version"
+            "ErrorResult",
+            "resource"
+          ]
+        },
+        "ResourcesResult": {
+          "type": "object",
+          "properties": {
+            "ErrorResult": {
+              "$ref": "#/definitions/ErrorResult"
+            },
+            "resources": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/ResourceResult"
+              }
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "ErrorResult",
+            "resources"
           ]
         }
       }
             "provider-vlan-id": {
               "type": "string"
             },
+            "routes": {
+              "type": "array",
+              "items": {
+                "$ref": "#/definitions/NetworkRoute"
+              }
+            },
             "vlan-tag": {
               "type": "integer"
             }
             "disabled"
           ]
         },
+        "NetworkRoute": {
+          "type": "object",
+          "properties": {
+            "destination-cidr": {
+              "type": "string"
+            },
+            "gateway-ip": {
+              "type": "string"
+            },
+            "metric": {
+              "type": "integer"
+            }
+          },
+          "additionalProperties": false,
+          "required": [
+            "destination-cidr",
+            "gateway-ip",
+            "metric"
+          ]
+        },
         "NotifyWatchResult": {
           "type": "object",
           "properties": {