Description of change
Add SpaceID to SubnetInfo{}, for use when SubnetInfo is used to create a subnet and within state. When used for client calls, SubnetName is still appropriate as the data comes direct from the provider and no SpaceID is readily available
Update SubnetInfo use to prefer SpaceId over SpaceName when adding a subnet by stopping convertion of SpaceId to SpaceName solely to add data to SubnetInfo. Caveates: SubnetInfo going to client output. Migration import which calls addSubnetOps() directly.
Update tests using AddSubnet to have SubnetInfo arg providing a SubnetID instead of SubnetName.
QA steps
Bootstrap AWS. Ensure all of the subnets were added correctly, by running juju subnets and juju spaces. Add a space and view the result. Verify that juju subnets --space yields correct results.
Bootstrap MaaS using a space constraint
该提问来源于开源项目:juju/juju