summaryrefslogtreecommitdiffstats
path: root/puppet/services/pacemaker
AgeCommit message (Expand)AuthorFilesLines
2016-07-08Composable Midonet for NeutronDan Prince1-0/+28
2016-07-05Merge "Split Heat pacemaker roles into separate services"Jenkins4-13/+7
2016-06-23Revert "Ceilometer composable roles for controller"Dan Prince4-116/+0
2016-06-23Merge "Ceilometer composable roles for controller"Jenkins4-0/+116
2016-06-23Merge "Composable opencontrail plugin"Jenkins1-0/+28
2016-06-23Ceilometer composable roles for controllerPradeep Kilambi4-0/+116
2016-06-22Update neutron ml2 classEmilien Macchi1-1/+1
2016-06-22Split Heat pacemaker roles into separate servicesBrad P. Crochet4-13/+7
2016-06-16Composable opencontrail pluginDan Prince1-0/+28
2016-06-16Composable neutron nuage pluginDan Prince1-0/+28
2016-06-15Merge "Composable Neutron Plumgrid plugin"Jenkins1-0/+28
2016-06-14Enable nova-vncproxy as a composable serviceEmilien Macchi1-0/+30
2016-06-14Enable nova-consoleauth as a composable serviceEmilien Macchi1-0/+30
2016-06-14Enable nova-scheduler as a composable serviceEmilien Macchi1-0/+30
2016-06-14Enable nova-api as a composable serviceEmilien Macchi1-0/+30
2016-06-13Composable Neutron Plumgrid pluginDan Prince1-0/+28
2016-06-12Composable roles within services - MongoDBCarlos Camacho1-0/+28
2016-06-09composable neutron ml2 and ovs agentDan Prince2-0/+53
2016-06-09composable neutron serverDan Prince1-0/+30
2016-06-06Merge "Explode Loadbalancer role into HAproxy + keepalived"Jenkins1-5/+5
2016-06-06Enable nova-conductor as a composable serviceEmilien Macchi1-0/+30
2016-06-04Explode Loadbalancer role into HAproxy + keepalivedEmilien Macchi1-5/+5
2016-06-04Merge "Composable roles within services - Redis"Jenkins1-0/+28
2016-06-02Switch Cinder Api/Scheduler/Volume to composable rolesGiulio Fidente3-0/+90
2016-06-02Composable roles within services - RedisPradeep Kilambi1-0/+28
2016-06-02Merge "Composable Sahara services"Jenkins2-0/+62
2016-06-01Composable Sahara servicesBrad P. Crochet2-0/+62
2016-05-30loadbalancer: update hiera parameters for HAproxy/keepalived splitEmilien Macchi1-3/+3
2016-05-30Merge "Pass enabled and manage_service to Neutron/L3 when Pacemaker"Jenkins1-0/+2
2016-05-30Pass MysqlVirtualIP via EndpointMapGiulio Fidente13-52/+0
2016-05-26Merge "composable heat services"Jenkins4-0/+139
2016-05-20Adds memcached as a composable servicemarios1-0/+31
2016-05-19composable heat servicesBrad P. Crochet4-0/+139
2016-05-19Deploy Loadbalancer as a composable roleEmilien Macchi1-0/+34
2016-05-18Deploy RabbitMQ as a composable roleEmilien Macchi1-0/+32
2016-05-18Pass enabled and manage_service to Neutron/L3 when PacemakerGiulio Fidente1-0/+2
2016-05-18composable neutron metadata serviceDan Prince1-0/+33
2016-05-18composable neutron l3 serviceDan Prince1-0/+33
2016-05-13Ensure manage_service and enabled are false for PacemakerGiulio Fidente4-3/+10
2016-05-10composable neutron dhcp serviceDan Prince1-0/+33
2016-04-21composable glance servicesDan Prince2-0/+93
2016-04-09composable keystone servicesDan Prince1-0/+34
span>kwargs): # filter out when a step needs to handle post/form data # if 'workflow' in post data, this post request was meant for me, not step if request.method == 'POST' and request.POST.get('workflow', None) is None: return self.active_workflow().steps[self.active_workflow().active_index].post_render(request) return self.active_workflow().steps[self.active_workflow().active_index].render(request) def post_render(self, request): return self.active_workflow().steps[self.active_workflow().active_index].post_render(request) def goto(self, num, **kwargs): self.active_workflow().repository.el['active_step'] = int(num) self.active_workflow().active_index = int(num) # TODO: change to include some checking def prefill_repo(self, target_id, workflow_type): self.repository.el[self.repository.EDIT] = True edit_object = None if workflow_type == 0: edit_object = Booking.objects.get(pk=target_id) self.prefill_booking(edit_object) elif workflow_type == 1: edit_object = GenericResourceBundle.objects.get(pk=target_id) self.prefill_resource(edit_object) elif workflow_type == 2: edit_object = ConfigBundle.objects.get(pk=target_id) self.prefill_config(edit_object) def prefill_booking(self, booking): models = self.make_booking_models(booking) confirmation = self.make_booking_confirm(booking) self.active_workflow().repository.el[self.active_workflow().repository.BOOKING_MODELS] = models self.active_workflow().repository.el[self.active_workflow().repository.CONFIRMATION] = confirmation self.active_workflow().repository.el[self.active_workflow().repository.GRESOURCE_BUNDLE_MODELS] = self.make_grb_models(booking.resource.template) self.active_workflow().repository.el[self.active_workflow().repository.SELECTED_GRESOURCE_BUNDLE] = self.make_grb_models(booking.resource.template)['bundle'] self.active_workflow().repository.el[self.active_workflow().repository.CONFIG_MODELS] = self.make_config_models(booking.config_bundle) def prefill_resource(self, resource): models = self.make_grb_models(resource) confirm = self.make_grb_confirm(resource) self.active_workflow().repository.el[self.active_workflow().repository.GRESOURCE_BUNDLE_MODELS] = models self.active_workflow().repository.el[self.active_workflow().repository.CONFIRMATION] = confirm def prefill_config(self, config): models = self.make_config_models(config) confirm = self.make_config_confirm(config) self.active_workflow().repository.el[self.active_workflow().repository.CONFIG_MODELS] = models self.active_workflow().repository.el[self.active_workflow().repository.CONFIRMATION] = confirm grb_models = self.make_grb_models(config.bundle) self.active_workflow().repository.el[self.active_workflow().repository.GRESOURCE_BUNDLE_MODELS] = grb_models def make_grb_models(self, resource): models = self.active_workflow().repository.el.get(self.active_workflow().repository.GRESOURCE_BUNDLE_MODELS, {}) models['hosts'] = [] models['bundle'] = resource models['interfaces'] = {} models['vlans'] = {} for host in resource.getHosts(): models['hosts'].append(host) models['interfaces'][host.resource.name] = [] models['vlans'][host.resource.name] = {} for interface in host.generic_interfaces.all(): models['interfaces'][host.resource.name].append(interface) models['vlans'][host.resource.name][interface.profile.name] = [] for vlan in interface.vlans.all(): models['vlans'][host.resource.name][interface.profile.name].append(vlan) return models def make_grb_confirm(self, resource): confirm = self.active_workflow().repository.el.get(self.active_workflow().repository.CONFIRMATION, {}) confirm['resource'] = {} confirm['resource']['hosts'] = [] confirm['resource']['lab'] = resource.lab.lab_user.username for host in resource.getHosts(): confirm['resource']['hosts'].append({"name": host.resource.name, "profile": host.profile.name}) return confirm def make_config_models(self, config): models = self.active_workflow().repository.el.get(self.active_workflow().repository.CONFIG_MODELS, {}) models['bundle'] = config models['host_configs'] = [] for host_conf in HostConfiguration.objects.filter(bundle=config): models['host_configs'].append(host_conf) models['opnfv'] = OPNFVConfig.objects.filter(bundle=config).last() return models def make_config_confirm(self, config): confirm = self.active_workflow().repository.el.get(self.active_workflow().repository.CONFIRMATION, {}) confirm['configuration'] = {} confirm['configuration']['hosts'] = [] confirm['configuration']['name'] = config.name confirm['configuration']['description'] = config.description opnfv = OPNFVConfig.objects.filter(bundle=config).last() confirm['configuration']['installer'] = opnfv.installer.name confirm['configuration']['scenario'] = opnfv.scenario.name for host_conf in HostConfiguration.objects.filter(bundle=config): h = {"name": host_conf.host.resource.name, "image": host_conf.image.name, "role": host_conf.opnfvRole.name} confirm['configuration']['hosts'].append(h) return confirm def make_booking_models(self, booking): models = self.active_workflow().repository.el.get(self.active_workflow().repository.BOOKING_MODELS, {}) models['booking'] = booking models['collaborators'] = [] for user in booking.collaborators.all(): models['collaborators'].append(user) return models def make_booking_confirm(self, booking): confirm = self.active_workflow().repository.el.get(self.active_workflow().repository.CONFIRMATION, {}) confirm['booking'] = {} confirm['booking']['length'] = (booking.end - booking.start).days confirm['booking']['project'] = booking.project confirm['booking']['purpose'] = booking.purpose confirm['booking']['resource name'] = booking.resource.template.name confirm['booking']['configuration name'] = booking.config_bundle.name confirm['booking']['collaborators'] = [] for user in booking.collaborators.all(): confirm['booking']['collaborators'].append(user.username) return confirm class ManagerTracker(): instance = None managers = {} def __init__(self): pass @staticmethod def getInstance(): if ManagerTracker.instance is None: ManagerTracker.instance = ManagerTracker() return ManagerTracker.instance