Beispiel #1
0
        protected override AzureSubnet Get(string subnetName)
        {
            AzureVnet vnet         = Parent as AzureVnet;
            var       subnetResult = Client.Subnets.Get(vnet.Id.ResourceGroup, vnet.Name, subnetName);

            return(new AzureSubnet(vnet, new PhSubnet(subnetResult.Value, vnet.Location)));
        }
Beispiel #2
0
        public AzureSubnet CreateOrUpdateSubnets(AzureSubnet subnet)
        {
            AzureVnet vnet         = Parent as AzureVnet;
            var       subnetResult = Client.Subnets.StartCreateOrUpdate(vnet.Id.ResourceGroup, vnet.Name, subnet.Name, subnet.Model).WaitForCompletionAsync().Result;

            subnet = new AzureSubnet(vnet, new PhSubnet(subnetResult.Value, vnet.Location));
            return(subnet);
        }
Beispiel #3
0
        protected override IEnumerable <AzureSubnet> GetItems()
        {
            AzureVnet vnet = Parent as AzureVnet;

            foreach (var subnet in Client.Subnets.List(vnet.Id.ResourceGroup, vnet.Name))
            {
                yield return(new AzureSubnet(vnet, new PhSubnet(subnet, vnet.Location)));
            }
        }
 public AzureSubnet(AzureVnet vnet, PhSubnet model) : base(vnet, model)
 {
 }
Beispiel #5
0
 public SubnetCollection(AzureVnet vnet) : base(vnet)
 {
 }