Completed
Pull Request — master (#415)
by Anthony
02:06
created

GetIPV6AddressAction   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %
Metric Value
dl 0
loc 6
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 4 1
1
from lib import actions
2
from time import sleep
0 ignored issues
show
Unused Code introduced by
Unused sleep imported from time
Loading history...
3
4
__all__ = [
5
    'GetIPV6AddressAction',
6
]
7
8
9
class GetIPV6AddressAction(actions.BaseAction):
10
11
    def run(self, region, id):
0 ignored issues
show
Bug Best Practice introduced by
This seems to re-define the built-in id.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
12
        driver = self._get_compute_driver(region)
13
        node = driver.ex_get_node_by_id(id)
14
        return node.extra['ipv6']
15