Revision 9e20fcee snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py

b/snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py
36 36
"""
37 37
import sys
38 38
import datetime
39
import subprocess
40 39

  
41 40
from optparse import make_option
42 41

  
......
45 44
from synnefo.db.models import VirtualMachine, Network, pooled_rapi_client
46 45
from synnefo.logic import reconciliation, utils
47 46
from synnefo.logic import backend as backend_mod
47
from synnefo.util.mac2eui64 import mac2eui64
48 48
from synnefo.management.common import get_backend
49 49

  
50 50

  
......
274 274
                backend_mod.process_net_status(vm=vm, etime=event_time,
275 275
                                               nics=final_nics)
276 276
            print >> sys.stderr, "    ...done"
277

  
278

  
279
def mac2eui64(mac, prefixstr):
280
    process = subprocess.Popen(["mac2eui64", mac, prefixstr],
281
                               stdout=subprocess.PIPE)
282
    return process.stdout.read().rstrip()

Also available in: Unified diff