Esempio n. 1
0
 def __init__(self,
              resource_group=None,
              load_balancer_name=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     load_balancer_name = load_balancer_name or \
         utils.get_resource_name_ref(
             constants.REL_CONTAINED_IN_LB,
             'load_balancer_name',
             _ctx=_ctx)
     Resource.__init__(
         self,
         'Backend Address Pool',
         '/{0}/{1}/{2}/{3}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Network',
             'loadBalancers/{0}'.format(load_balancer_name),
             'backendAddressPools'
         ),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              load_balancer_name=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     load_balancer_name = load_balancer_name or \
         utils.get_resource_name_ref(
             constants.REL_CONTAINED_IN_LB,
             'load_balancer_name',
             _ctx=_ctx)
     Resource.__init__(
         self,
         'Backend Address Pool',
         '/{0}/{1}/{2}/{3}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Network',
             'loadBalancers/{0}'.format(load_balancer_name),
             'backendAddressPools'
         ),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
 def __init__(self,
              api_version=constants.API_VER_RESOURCES,
              logger=None,
              _ctx=ctx):
     Resource.__init__(self,
                       'Resource Group',
                       '/resourceGroups',
                       api_version=api_version,
                       logger=logger,
                       _ctx=_ctx)
 def __init__(self,
              api_version=constants.API_VER_RESOURCES,
              logger=None,
              _ctx=ctx):
     Resource.__init__(
         self,
         'Resource Group',
         '/resourceGroups',
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
Esempio n. 5
0
 def __init__(self,
              resource_group=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     Resource.__init__(self,
                       'Public IP Address',
                       '/{0}/{1}'.format(
                           'resourceGroups/{0}'.format(resource_group),
                           'providers/Microsoft.Network/publicIPAddresses'),
                       api_version=api_version,
                       logger=logger,
                       _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              api_version=constants.API_VER_COMPUTE,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     Resource.__init__(self,
                       'Availability Set',
                       '/{0}/{1}'.format(
                           'resourceGroups/{0}'.format(resource_group),
                           'providers/Microsoft.Compute/availabilitySets'),
                       api_version=api_version,
                       logger=logger,
                       _ctx=_ctx)
Esempio n. 7
0
 def __init__(self,
              resource_group=None,
              api_version=constants.API_VER_STORAGE,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     Resource.__init__(self,
                       'Storage Account',
                       '/{0}/{1}'.format(
                           'resourceGroups/{0}'.format(resource_group),
                           'providers/Microsoft.Storage/storageAccounts'),
                       api_version=api_version,
                       logger=logger,
                       _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              api_version=constants.API_VER_COMPUTE,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     Resource.__init__(self,
                       'Virtual Machine',
                       '/{0}/{1}/{2}'.format(
                           'resourceGroups/{0}'.format(resource_group),
                           'providers/Microsoft.Compute',
                           'virtualMachines'),
                       api_version=api_version,
                       logger=logger,
                       _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              api_version=constants.API_VER_STORAGE,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     Resource.__init__(
         self,
         'Storage Account',
         '/{0}/{1}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Storage/storageAccounts'
         ),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     Resource.__init__(
         self,
         'Public IP Address',
         '/{0}/{1}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Network/publicIPAddresses'
         ),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              api_version=constants.API_VER_COMPUTE,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     Resource.__init__(
         self,
         'Availability Set',
         '/{0}/{1}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Compute/availabilitySets'
         ),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              api_version=constants.API_VER_COMPUTE,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     Resource.__init__(
         self,
         'Virtual Machine',
         '/{0}/{1}/{2}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Compute',
             'virtualMachines'
         ),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
Esempio n. 13
0
 def __init__(self,
              resource_group=None,
              route_table=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     route_table = route_table or \
         utils.get_route_table(_ctx=_ctx)
     Resource.__init__(self,
                       'Route',
                       '/{0}/{1}/{2}/{3}'.format(
                           'resourceGroups/{0}'.format(resource_group),
                           'providers/Microsoft.Network',
                           'routeTables/{0}'.format(route_table), 'routes'),
                       api_version=api_version,
                       logger=logger,
                       _ctx=_ctx)
Esempio n. 14
0
 def __init__(self,
              resource_group=None,
              virtual_network=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     virtual_network = virtual_network or \
         utils.get_virtual_network(_ctx=_ctx)
     Resource.__init__(self,
                       'Subnet',
                       '/{0}/{1}/{2}/{3}'.format(
                           'resourceGroups/{0}'.format(resource_group),
                           'providers/Microsoft.Network',
                           'virtualNetworks/{0}'.format(virtual_network),
                           'subnets'),
                       api_version=api_version,
                       logger=logger,
                       _ctx=_ctx)
Esempio n. 15
0
 def __init__(self,
              resource_group=None,
              virtual_machine=None,
              api_version=constants.API_VER_COMPUTE,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     virtual_machine = virtual_machine or \
         utils.get_rel_node_name(constants.REL_VMX_CONTAINED_IN_VM)
     Resource.__init__(self,
                       'Virtual Machine Extension',
                       '/{0}/{1}/{2}/{3}'.format(
                           'resourceGroups/{0}'.format(resource_group),
                           'providers/Microsoft.Compute',
                           'virtualMachines/{0}'.format(virtual_machine),
                           'extensions'),
                       api_version=api_version,
                       logger=logger,
                       _ctx=_ctx)
Esempio n. 16
0
 def __init__(self,
              resource_group=None,
              network_interface_card=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     network_interface_card = network_interface_card or \
         _ctx.node.properties.get('network_interface_card_name')
     Resource.__init__(
         self,
         'IP Configuration',
         '/{0}/{1}/{2}/{3}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Network/',
             'networkInterfaces/{0}'.format(network_interface_card),
             'ipConfigurations'),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              network_security_group=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     network_security_group = network_security_group or \
         utils.get_network_security_group(_ctx=_ctx)
     Resource.__init__(
         self,
         'Network Security Rule',
         '/{0}/{1}/{2}/{3}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Network',
             'networkSecurityGroups/{0}'.format(network_security_group),
             'securityRules'),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              network_security_group=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     network_security_group = network_security_group or \
         utils.get_network_security_group(_ctx=_ctx)
     Resource.__init__(
         self,
         'Network Security Rule',
         '/{0}/{1}/{2}/{3}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Network',
             'networkSecurityGroups/{0}'.format(network_security_group),
             'securityRules'
         ),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              virtual_network=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     virtual_network = virtual_network or \
         utils.get_virtual_network(_ctx=_ctx)
     Resource.__init__(
         self,
         'Subnet',
         '/{0}/{1}/{2}/{3}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Network',
             'virtualNetworks/{0}'.format(virtual_network),
             'subnets'
         ),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              virtual_machine=None,
              api_version=constants.API_VER_COMPUTE,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     virtual_machine = virtual_machine or \
         utils.get_rel_node_name(constants.REL_VMX_CONTAINED_IN_VM)
     Resource.__init__(
         self,
         'Virtual Machine Extension',
         '/{0}/{1}/{2}/{3}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Compute',
             'virtualMachines/{0}'.format(virtual_machine),
             'extensions'
         ),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)
 def __init__(self,
              resource_group=None,
              network_interface_card=None,
              api_version=constants.API_VER_NETWORK,
              logger=None,
              _ctx=ctx):
     resource_group = resource_group or \
         utils.get_resource_group(_ctx=_ctx)
     network_interface_card = network_interface_card or \
         _ctx.node.properties.get('network_interface_card_name')
     Resource.__init__(
         self,
         'IP Configuration',
         '/{0}/{1}/{2}/{3}'.format(
             'resourceGroups/{0}'.format(resource_group),
             'providers/Microsoft.Network/',
             'networkInterfaces/{0}'.format(network_interface_card),
             'ipConfigurations'
         ),
         api_version=api_version,
         logger=logger,
         _ctx=_ctx)