예제 #1
0
 def ipv6_addr(self, iface):
     """ MGMT_IPV6_PREFIX:N:10ii:ssss:ssss:ssss/64 """
     # Hex representation of the needed values
     nr = '10' + int_to_hex_str(iface.nr, 2)
     node_id = int_to_hex_str(iface.sliver.node_id, 4)
     slice_id = int_to_hex_str(iface.sliver.slice_id, 12)
     ipv6_words = MGMT_IPV6_PREFIX.split(':')[:3]
     ipv6_words.extend([node_id, nr])
     ipv6_words.extend(split_len(slice_id, 4))
     return IP(':'.join(ipv6_words))
예제 #2
0
 def ipv6_addr(self, iface):
     """ MGMT_IPV6_PREFIX:N:10ii:ssss:ssss:ssss/64 """
     # Hex representation of the needed values
     nr = '10' + int_to_hex_str(iface.nr, 2)
     node_id = int_to_hex_str(iface.sliver.node_id, 4)
     slice_id = int_to_hex_str(iface.sliver.slice_id, 12)
     ipv6_words = MGMT_IPV6_PREFIX.split(':')[:3]
     ipv6_words.extend([node_id, nr])
     ipv6_words.extend(split_len(slice_id, 4))
     return IP(':'.join(ipv6_words))
def server_mgmt_address(server):
    ipv6_words = MGMT_IPV6_PREFIX.split(':')[:3]
    # MGMT_IPV6_PREFIX:0:0000::2/128
    return IP(':'.join(ipv6_words) + '::2')
def node_mgmt_address(node):
    ipv6_words = MGMT_IPV6_PREFIX.split(':')[:3]
    # MGMT_IPV6_PREFIX:N:0000::2/64
    ipv6_words.append(int_to_hex_str(node.id, 4))
    return IP(':'.join(ipv6_words) + '::2')
def server_mgmt_address(server):
    ipv6_words = MGMT_IPV6_PREFIX.split(':')[:3]
    # MGMT_IPV6_PREFIX:0:0000::2/128
    return IP(':'.join(ipv6_words) + '::2')
def node_mgmt_address(node):
    ipv6_words = MGMT_IPV6_PREFIX.split(':')[:3]
    # MGMT_IPV6_PREFIX:N:0000::2/64
    ipv6_words.append(int_to_hex_str(node.id, 4))
    return IP(':'.join(ipv6_words) + '::2')