MCPcopy Create free account
hub / github.com/apache/cloudstack / process

Method process

systemvm/debian/opt/cloud/bin/merge.py:95–148  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93 self.process()
94
95 def process(self):
96 self.db = DataBag()
97 if (self.qFile.type == "staticnatrules" or self.qFile.type == "forwardrules"):
98 self.db.setKey("forwardingrules")
99 else:
100 self.db.setKey(self.qFile.type)
101 dbag = self.db.load()
102 logging.info("Command of type %s received", self.qFile.type)
103
104 if self.qFile.type == 'ips':
105 dbag = self.processIP(self.db.getDataBag())
106 elif self.qFile.type == 'guestnetwork':
107 dbag = self.processGuestNetwork(self.db.getDataBag())
108 elif self.qFile.type == 'cmdline':
109 dbag = self.processCL(self.db.getDataBag())
110 elif self.qFile.type == 'vmpassword':
111 dbag = self.processVMpassword(self.db.getDataBag())
112 elif self.qFile.type == 'networkacl':
113 dbag = self.process_network_acl(self.db.getDataBag())
114 elif self.qFile.type == 'firewallrules':
115 dbag = self.process_firewallrules(self.db.getDataBag())
116 elif self.qFile.type == 'ipv6firewallrules':
117 dbag = self.process_ipv6firewallrules(self.db.getDataBag())
118 elif self.qFile.type == 'loadbalancer':
119 dbag = self.process_loadbalancer(self.db.getDataBag())
120 elif self.qFile.type == 'monitorservice':
121 dbag = self.process_monitorservice(self.db.getDataBag())
122 elif self.qFile.type == 'vmdata':
123 dbag = self.processVmData(self.db.getDataBag())
124 elif self.qFile.type == 'dhcpentry':
125 dbag = self.process_dhcp_entry(self.db.getDataBag())
126 elif self.qFile.type == 'staticnatrules' or self.qFile.type == 'forwardrules':
127 dbag = self.processForwardingRules(self.db.getDataBag())
128 elif self.qFile.type == 'site2sitevpn':
129 dbag = self.process_site2sitevpn(self.db.getDataBag())
130 elif self.qFile.type == 'remoteaccessvpn':
131 dbag = self.process_remoteaccessvpn(self.db.getDataBag())
132 elif self.qFile.type == 'vpnuserlist':
133 dbag = self.process_vpnusers(self.db.getDataBag())
134 elif self.qFile.type == 'staticroutes':
135 dbag = self.process_staticroutes(self.db.getDataBag())
136 elif self.qFile.type == 'bgppeers':
137 dbag = self.process_bgppeers(self.db.getDataBag())
138 elif self.qFile.type == 'ipaliases':
139 self.db.setKey('ips')
140 self.db.load()
141 dbag = self.process_ipaliases(self.db.getDataBag())
142 elif self.qFile.type == 'dhcpconfig':
143 logging.error("I don't think I need %s anymore", self.qFile.type)
144 return
145 else:
146 logging.error("Error I do not know what to do with file of type %s", self.qFile.type)
147 return
148 self.db.save(dbag)
149
150 def processGuestNetwork(self, dbag):
151 d = self.qFile.data

Callers 1

__init__Method · 0.95

Calls 15

processIPMethod · 0.95
processGuestNetworkMethod · 0.95
processCLMethod · 0.95
processVMpasswordMethod · 0.95
process_network_aclMethod · 0.95
process_firewallrulesMethod · 0.95
process_loadbalancerMethod · 0.95
processVmDataMethod · 0.95
process_dhcp_entryMethod · 0.95

Tested by

no test coverage detected