Search in sources :

Example 1 with Network

use of com.microsoft.azure.toolkit.lib.compute.network.Network in project azure-tools-for-java by Microsoft.

the class VirtualNetworkComboBox method resetResourceDraft.

private void resetResourceDraft() {
    final Network value = getValue();
    if (value != null && !StringUtils.equals(value.status(), IAzureBaseResource.Status.DRAFT)) {
        draftNetwork = DraftNetwork.getDefaultNetworkDraft();
        draftNetwork.setRegion(region);
        draftNetwork.setResourceGroup(Optional.ofNullable(resourceGroup).map(ResourceGroup::getName).orElse(null));
        draftNetwork.setSubscriptionId(Optional.ofNullable(subscription).map(Subscription::getId).orElse(null));
        setValue(draftNetwork);
    }
}
Also used : DraftNetwork(com.microsoft.azure.toolkit.lib.compute.network.DraftNetwork) AzureNetwork(com.microsoft.azure.toolkit.lib.compute.network.AzureNetwork) Network(com.microsoft.azure.toolkit.lib.compute.network.Network) Subscription(com.microsoft.azure.toolkit.lib.common.model.Subscription) ResourceGroup(com.microsoft.azure.toolkit.lib.common.model.ResourceGroup)

Example 2 with Network

use of com.microsoft.azure.toolkit.lib.compute.network.Network in project azure-tools-for-java by Microsoft.

the class VMCreationDialog method onNetworkChanged.

private void onNetworkChanged(final ItemEvent e) {
    if (e.getStateChange() == ItemEvent.SELECTED && e.getItem() instanceof Network) {
        final Network network = (Network) e.getItem();
        this.cbSubnet.setNetwork(network);
    }
}
Also used : Network(com.microsoft.azure.toolkit.lib.compute.network.Network)

Aggregations

Network (com.microsoft.azure.toolkit.lib.compute.network.Network)2 ResourceGroup (com.microsoft.azure.toolkit.lib.common.model.ResourceGroup)1 Subscription (com.microsoft.azure.toolkit.lib.common.model.Subscription)1 AzureNetwork (com.microsoft.azure.toolkit.lib.compute.network.AzureNetwork)1 DraftNetwork (com.microsoft.azure.toolkit.lib.compute.network.DraftNetwork)1