File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2006,15 +2006,18 @@ def interfaces_settings(self) -> LinodeInterfacesSettings:
20062006        return  self ._interfaces_settings 
20072007
20082008    @property  
2009-     def  interfaces (self ) ->  List [ LinodeInterface ]:
2009+     def  linode_interfaces (self ) ->  Optional [ list [ LinodeInterface ] ]:
20102010        """ 
20112011        All interfaces for this Linode. 
20122012
20132013        API Documentation: https://techdocs.akamai.com/linode-api/reference/get-linode-interface 
20142014
2015-         :returns: An ordered list of interfaces under this Linode. 
2015+         :returns: An ordered list of linode interfaces under this Linode. If the linode is with legacy config interfaces, returns None. 
2016+         :rtype: Optional[list[LinodeInterface]] 
20162017        """ 
20172018
2019+         if  self .interface_generation  !=  InterfaceGeneration .LINODE :
2020+             return  None 
20182021        if  not  hasattr (self , "_interfaces" ):
20192022            result  =  self ._client .get (
20202023                "{}/interfaces" .format (Instance .api_endpoint ),
Original file line number Diff line number Diff line change @@ -481,7 +481,7 @@ def test_get_interfaces(self):
481481
482482        assert  instance .interface_generation  ==  InterfaceGeneration .LINODE 
483483
484-         interfaces  =  instance .interfaces 
484+         interfaces  =  instance .linode_interfaces 
485485
486486        LinodeInterfaceTest .assert_linode_124_interface_123 (
487487            next (iface  for  iface  in  interfaces  if  iface .id  ==  123 )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments