示例#1
0
from utilities.api import OrderedDefaultRouter
from . import views

router = OrderedDefaultRouter()
router.APIRootView = views.TenancyRootView

# Tenants
router.register('tenant-groups', views.TenantGroupViewSet)
router.register('tenants', views.TenantViewSet)

app_name = 'tenancy-api'
urlpatterns = router.urls
示例#2
0
from utilities.api import OrderedDefaultRouter
from . import views

router = OrderedDefaultRouter()
router.APIRootView = views.UsersRootView

# Users and groups
router.register('users', views.UserViewSet)
router.register('groups', views.GroupViewSet)

# Permissions
router.register('permissions', views.ObjectPermissionViewSet)

app_name = 'users-api'
urlpatterns = router.urls
from utilities.api import OrderedDefaultRouter
from netbox_aws.api import views


router = OrderedDefaultRouter()
router.APIRootView = views.AWSRootView

# VPCs
router.register('vpcs', views.VPCViewSet)

app_name = 'netbox_aws-api'
urlpatterns = router.urls
示例#4
0
from utilities.api import OrderedDefaultRouter
from . import views

router = OrderedDefaultRouter()
router.APIRootView = views.SecretsRootView

# Secrets
router.register('secret-roles', views.SecretRoleViewSet)
router.register('secrets', views.SecretViewSet)

# Miscellaneous
router.register('get-session-key',
                views.GetSessionKeyViewSet,
                basename='get-session-key')
router.register('generate-rsa-key-pair',
                views.GenerateRSAKeyPairViewSet,
                basename='generate-rsa-key-pair')

app_name = 'secrets-api'
urlpatterns = router.urls
示例#5
0
from utilities.api import OrderedDefaultRouter
from . import views

router = OrderedDefaultRouter()
router.APIRootView = views.IPAMRootView

# VRFs
router.register('vrfs', views.VRFViewSet)

# RIRs
router.register('rirs', views.RIRViewSet)

# Aggregates
router.register('aggregates', views.AggregateViewSet)

# Prefixes
router.register('roles', views.RoleViewSet)
router.register('prefixes', views.PrefixViewSet)

# IP addresses
router.register('ip-addresses', views.IPAddressViewSet)

# VLANs
router.register('vlan-groups', views.VLANGroupViewSet)
router.register('vlans', views.VLANViewSet)

# Services
router.register('services', views.ServiceViewSet)

app_name = 'ipam-api'
urlpatterns = router.urls
示例#6
0
from utilities.api import OrderedDefaultRouter
from . import views


router = OrderedDefaultRouter()
router.APIRootView = views.DCIMRootView

# Sites
router.register('regions', views.RegionViewSet)
router.register('sites', views.SiteViewSet)

# Racks
router.register('rack-groups', views.RackGroupViewSet)
router.register('rack-roles', views.RackRoleViewSet)
router.register('racks', views.RackViewSet)
router.register('rack-reservations', views.RackReservationViewSet)

# Device types
router.register('manufacturers', views.ManufacturerViewSet)
router.register('device-types', views.DeviceTypeViewSet)

# Device type components
router.register('console-port-templates', views.ConsolePortTemplateViewSet)
router.register('console-server-port-templates', views.ConsoleServerPortTemplateViewSet)
router.register('power-port-templates', views.PowerPortTemplateViewSet)
router.register('power-outlet-templates', views.PowerOutletTemplateViewSet)
router.register('interface-templates', views.InterfaceTemplateViewSet)
router.register('front-port-templates', views.FrontPortTemplateViewSet)
router.register('rear-port-templates', views.RearPortTemplateViewSet)
router.register('device-bay-templates', views.DeviceBayTemplateViewSet)
示例#7
0
from utilities.api import OrderedDefaultRouter
from . import views

router = OrderedDefaultRouter()
router.APIRootView = views.ExtrasRootView

# Custom field choices
router.register('_custom_field_choices',
                views.CustomFieldChoicesViewSet,
                basename='custom-field-choice')

# Graphs
router.register('graphs', views.GraphViewSet)

# Export templates
router.register('export-templates', views.ExportTemplateViewSet)

# Tags
router.register('tags', views.TagViewSet)

# Image attachments
router.register('image-attachments', views.ImageAttachmentViewSet)

# Config contexts
router.register('config-contexts', views.ConfigContextViewSet)

# Reports
router.register('reports', views.ReportViewSet, basename='report')

# Scripts
router.register('scripts', views.ScriptViewSet, basename='script')
示例#8
0
from utilities.api import OrderedDefaultRouter
from . import views

router = OrderedDefaultRouter()
router.APIRootView = views.VirtualizationRootView

# Clusters
router.register('cluster-types', views.ClusterTypeViewSet)
router.register('cluster-groups', views.ClusterGroupViewSet)
router.register('clusters', views.ClusterViewSet)

# VirtualMachines
router.register('virtual-machines', views.VirtualMachineViewSet)
router.register('interfaces', views.VMInterfaceViewSet)

app_name = 'virtualization-api'
urlpatterns = router.urls