API for VLANs
Adds a host to the VLAN.
A host can be added to several VLANs. The first one is considered “primary” as is the VLAN that will used for the default route. The primary VLAN can be replaced by using the primary option in this method.
The primary VLAN can’t be changed if the host is providing a service in a load balancer using that same VLAN.
When a host is added to a VLAN, the network infrastructure is changed automatically and as consequence the host may lose connectivity if the required configuration changes are not performed.
If needed, a private IP in the VLAN network will be allocated and assigned to the host to be used by Memset’s automated tools.
In the case of Miniservers, a reboot using server.reboot() is required so any new interface and the VLAN configuration is available to the host.
By default automatic host configuration is supported for all Miniservers using Memset’s automated tools. For unmanaged Miniservers and Fullservers, manual configuration changes may be required.
Parameters: |
|
---|---|
Returns: | the output of vlan.list() after adding the host. |
Raises : | May raise ApiErrorPreconditionFailed if the primary VLAN can’t be changed. |
Describes the VLAN returning a dictionary.
Parameters: | name (String) – Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. |
---|---|
Returns: | A dictionary with the following keys:
|
Lists information about hosts associated to this VLAN returning a list of dictionaries.
Parameters: | name (String) – Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. |
---|---|
Returns: | A list of dictionaries with the following keys:
|
Removes a host from the VLAN.
The host will be removed from the VLAN unless one of the following conditions apply:
- The host is a Fullserver and this is the only VLAN it is in.
- The server is providing a service in a load balancer in this VLAN.
When a host is added to a VLAN, the network infrastructure is changed automatically and as consequence the host may lose connectivity if the required configuration changes are not performed.
Once the host is removed from the VLAN it is possible that the private address will not be in use any more. That private IP address won’t be removed automatically to avoid possible configuration problems in the host’s services. Please contact support if you want a private IP address to be deallocated.
In the case of Miniservers, a reboot using server.reboot() is required so any new interface and the VLAN configuration is available to the host.
By default automatic host configuration is supported for all Miniservers using Memset’s automated tools. For unmanaged Miniservers and Fullservers, manual configuration changes may be required.
Parameters: |
|
---|---|
Returns: | the output of vlan.list() after removing the host. |
Raises : | May raise ApiErrorPreconditionFailed if the host can’t be removed. |