Creating a canister through the CMC currently has a subnet filter option, that asks the developer to provide a subnet type.
type SubnetFilter = record {
subnet_type : opt text;
};
DFX also provides this in the documentation
--subnet-type <SUBNET_TYPE>
Specify the optional subnet type to create canisters on. If no subnet type is provided, the canister will be created on a random default application subnet
Given that the subnet_type was typed as an opt text and not as a variant, what is the complete list of values that works for this field?
Also, can the up to date possible values for this type be added to the documentation (or point me to them if they aren’t there ) ?
I decided to make it an arbitrary string because that’s what the CMC also uses. And I don’t want people to be locked out of new subnet types when they are added just because I haven’t gotten around to updating and releasing dfx.
Possible values are defined in the CMC’s get_subnet_types_to_subnets function. I just learned that we also have dfx ledger show-subnet-types.
At the moment I only expect the list to be added to, but I wouldn’t be too surprised if we at some point either renamed categories or if we switched subnet selection to a completely different mechanism
AFAIU the interface currently does not allow combining ‘tags’. If/when we get to the point where we tag subnets with multiple tags and allow selecting multiple tags I think we would need to extend the interface, which is why I made subnet_selection a variant so we can add new options easily