mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add ip_addresses relation on InterfaceType, VMInterfaceType
This commit is contained in:
12
netbox/ipam/graphql/mixins.py
Normal file
12
netbox/ipam/graphql/mixins.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import graphene
|
||||
|
||||
__all__ = (
|
||||
'IPAddressesMixin',
|
||||
)
|
||||
|
||||
|
||||
class IPAddressesMixin:
|
||||
ip_addresses = graphene.List('ipam.graphql.types.IPAddressType')
|
||||
|
||||
def resolve_ip_addresses(self, info):
|
||||
return self.ip_addresses.restrict(info.context.user, 'view')
|
Reference in New Issue
Block a user