Revision 95059648
b/snf-cyclades-app/synnefo/logic/callbacks.py | ||
---|---|---|
177 | 177 |
msg['instance']) |
178 | 178 |
|
179 | 179 |
|
180 |
@instance_from_msg |
|
181 |
@if_update_required |
|
182 |
def update_net(vm, msg, event_time): |
|
183 |
"""Process a notification of type 'ganeti-net-status'""" |
|
184 |
log.debug("Processing ganeti-net-status msg: %s", msg) |
|
185 |
|
|
186 |
if msg['type'] != "ganeti-net-status": |
|
187 |
log.error("Message is of unknown type %s", msg['type']) |
|
188 |
return |
|
189 |
|
|
190 |
backend.process_net_status(vm, event_time, msg['nics']) |
|
191 |
|
|
192 |
log.debug("Done processing ganeti-net-status msg for vm %s.", |
|
193 |
msg["instance"]) |
|
194 |
|
|
195 |
|
|
196 | 180 |
@network_from_msg |
197 | 181 |
@if_update_required |
198 | 182 |
def update_network(network, msg, event_time): |
b/snf-cyclades-app/synnefo/logic/queues.py | ||
---|---|---|
42 | 42 |
# QUEUES |
43 | 43 |
QUEUE_OP = "%s-events-op" % prefix |
44 | 44 |
QUEUE_NETWORK = "%s-events-network" % prefix |
45 |
QUEUE_NET = "%s-events-net" % prefix |
|
46 | 45 |
QUEUE_PROGRESS = "%s-events-progress" % prefix |
47 | 46 |
|
48 | 47 |
|
49 | 48 |
QUEUES = (QUEUE_OP, |
50 | 49 |
QUEUE_NETWORK, |
51 |
QUEUE_NET, |
|
52 | 50 |
QUEUE_PROGRESS) |
53 | 51 |
|
54 | 52 |
# ROUTING KEYS |
... | ... | |
56 | 54 |
KEY_OP = 'ganeti.%s.event.op' % prefix |
57 | 55 |
# notifications of type "ganeti-network-status" |
58 | 56 |
KEY_NETWORK = 'ganeti.%s.event.network' % prefix |
59 |
# notifications of type "ganeti-net-status" |
|
60 |
KEY_NET = 'ganeti.%s.event.net' % prefix |
|
61 | 57 |
# notifications of type "ganeti-create-progress" |
62 | 58 |
KEY_PROGRESS = 'ganeti.%s.event.progress' % prefix |
63 | 59 |
|
... | ... | |
66 | 62 |
# Queue # Exchange # RouteKey # Handler |
67 | 63 |
(QUEUE_OP, EXCHANGE_GANETI, KEY_OP, 'update_db'), |
68 | 64 |
(QUEUE_NETWORK, EXCHANGE_GANETI, KEY_NETWORK, 'update_network'), |
69 |
(QUEUE_NET, EXCHANGE_GANETI, KEY_NET, 'update_net'), |
|
70 | 65 |
(QUEUE_PROGRESS, EXCHANGE_GANETI, KEY_PROGRESS, 'update_build_progress'), |
71 | 66 |
) |
72 | 67 |
|
Also available in: Unified diff