コード例 #1
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("Server Policies")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        self.content_list.append(
            UcsSystemBiosPoliciesReportSection(
                order_id=self.report.get_current_order_id(), parent=self))
        self.content_list.append(
            UcsSystemBootPoliciesReportSection(
                order_id=self.report.get_current_order_id(), parent=self))
        self.content_list.append(
            UcsSystemGraphicsCardPoliciesReportSection(
                order_id=self.report.get_current_order_id(), parent=self))
        self.content_list.append(
            UcsSystemLocalDiskConfigPoliciesReportSection(
                order_id=self.report.get_current_order_id(), parent=self))
        self.content_list.append(
            UcsSystemMaintenancePoliciesReportSection(
                order_id=self.report.get_current_order_id(), parent=self))
        self.content_list.append(
            UcsSystemScrubPoliciesReportSection(
                order_id=self.report.get_current_order_id(), parent=self))
        self.content_list.append(
            UcsSystemVmediaPoliciesReportSection(
                order_id=self.report.get_current_order_id(), parent=self))
コード例 #2
0
    def __init__(self, order_id, parent, vmedia_policy, title=""):
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        self.content_list.append(
            UcsSystemVmediaPolicyReportTable(
                order_id=self.report.get_current_order_id(),
                parent=self,
                centered=True,
                vmedia_policy=vmedia_policy))

        self.content_list.append(
            GenericReportText(order_id=self.report.get_current_order_id(),
                              parent=self,
                              string=_("\nvMedia Mounts: "),
                              bolded=True))

        for vmedia_mount in sorted(vmedia_policy.vmedia_mounts,
                                   key=lambda x: x["name"],
                                   reverse=False):
            self.content_list.append(
                UcsSystemVmediaMountReportTable(
                    order_id=self.report.get_current_order_id(),
                    parent=self,
                    centered=True,
                    vmedia_mount=vmedia_mount))
コード例 #3
0
    def __init__(self, order_id, parent, title, chassis):
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        path = self.report.img_path + "infra_" + "chassis_" + chassis.id + ".png"
        if os.path.exists(path):
            self.content_list.append(
                GenericReportImage(order_id=self.report.get_current_order_id(),
                                   parent=self,
                                   path=path,
                                   centered=True,
                                   size=18))

            self.content_list.append(
                UcsSystemInfraCablingChassisConnectivityTable(
                    order_id=self.report.get_current_order_id(),
                    parent=self,
                    fis=self.report.inventory.fabric_interconnects,
                    fexs=self.report.inventory.fabric_extenders,
                    chassis=chassis,
                    centered=True))
        else:
            self.content_list.append(
                GenericReportText(
                    order_id=self.report.get_current_order_id(),
                    parent=self,
                    string=_("This device is not connected to any FI")))
コード例 #4
0
    def __init__(self, order_id, parent, boot_policy, title=""):
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        self.content_list.append(
            UcsSystemBootPolicyReportTable(
                order_id=self.report.get_current_order_id(),
                parent=self,
                centered=True,
                boot_policy=boot_policy))

        self.content_list.append(
            GenericReportText(order_id=self.report.get_current_order_id(),
                              parent=self,
                              string=_("\nBoot Order: "),
                              bolded=True))

        if boot_policy.boot_order:
            self.content_list.append(
                UcsSystemBootOrderReportTable(
                    order_id=self.report.get_current_order_id(),
                    parent=self,
                    centered=True,
                    boot_policy=boot_policy))
コード例 #5
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("Internal Infrastructure cabling")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)
        if self.report.inventory.chassis:
            if self.report.inventory.fabric_interconnects[0].model not in [
                    "UCS-FI-M-6324"
            ]:
                self.content_list.append(
                    UcsSystemInfraCablingAllChassisReportSection(
                        order_id=self.report.get_current_order_id(),
                        parent=self))
            else:
                # Checking if we have a second chassis in UCS Mini, otherwise infra section is not needed
                if len(self.report.inventory.chassis) > 1:
                    self.content_list.append(
                        UcsSystemInfraCablingAllChassisReportSection(
                            order_id=self.report.get_current_order_id(),
                            parent=self))
        if self.report.inventory.rack_units:
            self.content_list.append(
                UcsSystemInfraCablingAllRacksReportSection(
                    order_id=self.report.get_current_order_id(), parent=self))

        if self.report.inventory.rack_enclosures:
            self.content_list.append(
                UcsSystemInfraCablingAllRackEnclosuresReportSection(
                    order_id=self.report.get_current_order_id(), parent=self))
コード例 #6
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("BIOS Policies")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        text = _(
            "Tokens with 'Platform-Default' values are not displayed below for easier readability."
        )
        self.content_list.append(
            GenericReportText(order_id=self.report.get_current_order_id(),
                              parent=self,
                              string=text,
                              italicized=True))

        bios_policies_list = []
        # Searching for all BIOS Policies
        for org in self.report.config.orgs:
            self.parse_org(org,
                           bios_policies_list,
                           element_to_parse="bios_policies")

        if bios_policies_list:
            for bios_policy in bios_policies_list:
                self.content_list.append(
                    UcsSystemBiosPolicyReportSection(
                        order_id=self.report.get_current_order_id(),
                        parent=self,
                        bios_policy=bios_policy,
                        title=_("BIOS Policy ") + bios_policy.name))
コード例 #7
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("Policies")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        self.content_list.append(
            UcsSystemServerPoliciesReportSection(
                order_id=self.report.get_current_order_id(), parent=self))
コード例 #8
0
    def __init__(self, order_id, parent, local_disk_config_policy, title=""):
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        self.content_list.append(
            UcsSystemLocalDiskConfigPolicyReportTable(
                order_id=self.report.get_current_order_id(),
                parent=self,
                centered=True,
                local_disk_config_policy=local_disk_config_policy))
コード例 #9
0
    def __init__(self, order_id, parent, graphics_card_policy, title=""):
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        self.content_list.append(
            UcsSystemGraphicsCardPolicyReportTable(
                order_id=self.report.get_current_order_id(),
                parent=self,
                centered=True,
                graphics_card_policy=graphics_card_policy))
コード例 #10
0
    def __init__(self, order_id, parent, bios_policy, title=""):
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        self.content_list.append(
            UcsSystemBiosPolicyReportTable(
                order_id=self.report.get_current_order_id(),
                parent=self,
                centered=True,
                bios_policy=bios_policy))
コード例 #11
0
 def __init__(self, order_id, parent, title=""):
     if not title:
         title = _("Architecture")
     UcsReportSection.__init__(self,
                               order_id=order_id,
                               parent=parent,
                               title=title)
     self.content_list.append(
         UcsSystemInfraCablingReportSection(
             self.report.get_current_order_id(), parent=self))
     self.content_list.append(
         UcsSystemNetworkNeighborsReportSection(
             self.report.get_current_order_id(), parent=self))
コード例 #12
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("Communication Services")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        self.content_list.append(
            UcsSystemCommServicesReportTable(
                order_id=self.report.get_current_order_id(),
                parent=self,
                config=self.report.config,
                device=self.report.device,
                centered=True))
コード例 #13
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("Intersight Device Connector")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        self.content_list.append(
            UcsIntersightReportTable(
                order_id=self.report.get_current_order_id(),
                parent=self,
                inventory=self.report.inventory,
                device=self.report.device,
                centered=True))
コード例 #14
0
 def __init__(self, order_id, parent, title=""):
     if not title:
         title = _("Network Neighbors")
     UcsReportSection.__init__(self,
                               order_id=order_id,
                               parent=parent,
                               title=title)
     if self.report.inventory.lan_neighbors:
         self.content_list.append(
             UcsSystemLanNeighborsReportSection(
                 order_id=self.report.get_current_order_id(), parent=self))
     if self.report.inventory.san_neighbors:
         self.content_list.append(
             UcsSystemSanNeighborsReportSection(
                 order_id=self.report.get_current_order_id(), parent=self))
コード例 #15
0
 def __init__(self, order_id, parent, title=""):
     if not title:
         title = _("Rack Enclosures Internal Infrastructure cabling")
     UcsReportSection.__init__(self,
                               order_id=order_id,
                               parent=parent,
                               title=title)
     for rack_enclosure in self.report.inventory.rack_enclosures:
         rack_enclosure_name = rack_enclosure.id
         self.content_list.append(
             UcsSystemInfraCablingRackEnclosureReportSection(
                 order_id=self.report.get_current_order_id(),
                 parent=self,
                 title=_("Rack Enclosure ") + rack_enclosure_name,
                 rack_enclosure=rack_enclosure))
コード例 #16
0
 def __init__(self, order_id, parent, title=""):
     if not title:
         title = _("Rack Servers Internal Infrastructure cabling")
     UcsReportSection.__init__(self,
                               order_id=order_id,
                               parent=parent,
                               title=title)
     for rack in self.report.inventory.rack_units:
         rack_name = rack.id
         if rack.user_label:
             rack_name = rack.id + " - " + rack.user_label
         self.content_list.append(
             UcsSystemInfraCablingRackReportSection(
                 order_id=self.report.get_current_order_id(),
                 parent=self,
                 title=_("Rack ") + rack_name,
                 rack=rack))
コード例 #17
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("UCS IMC Overview")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        self.content_list.append(
            UcsImcInfoReportTable(order_id=self.report.get_current_order_id(),
                                  parent=self,
                                  config=self.report.config,
                                  device=self.report.device,
                                  centered=True))

        if self.report.inventory.device_connector:
            self.content_list.append(
                UcsIntersightReportSection(
                    order_id=self.report.get_current_order_id(), parent=self))
コード例 #18
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("SAN Neighbors")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)
        san_neighbors_path = self.report.img_path + "infra_san_neighbors.png"
        self.content_list.append(
            GenericReportImage(order_id=self.report.get_current_order_id(),
                               parent=self,
                               path=san_neighbors_path,
                               centered=True,
                               size=18))

        self.content_list.append(
            UcsSystemSanNeighborsConnectivityTable(
                order_id=self.report.get_current_order_id(),
                parent=self,
                fis=self.report.inventory.fabric_interconnects,
                centered=False))
コード例 #19
0
 def __init__(self, order_id, parent, title=""):
     if not title:
         title = _("Chassis Internal Infrastructure cabling")
     UcsReportSection.__init__(self,
                               order_id=order_id,
                               parent=parent,
                               title=title)
     for chassis in self.report.inventory.chassis:
         if chassis.id == "1" and self.report.inventory.fabric_interconnects[
                 0].model in ["UCS-FI-M-6324"]:
             # We do not create a section for chassis 1 in UCS Mini
             continue
         chassis_name = chassis.id
         if chassis.user_label:
             chassis_name = chassis.id + " - " + chassis.user_label
         self.content_list.append(
             UcsSystemInfraCablingChassisReportSection(
                 order_id=self.report.get_current_order_id(),
                 parent=self,
                 title=_("Chassis ") + chassis_name,
                 chassis=chassis))
コード例 #20
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("Boot Policies")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        boot_policies_list = []
        # Searching for all Boot Policies
        for org in self.report.config.orgs:
            self.parse_org(org,
                           boot_policies_list,
                           element_to_parse="boot_policies")

        if boot_policies_list:
            for boot_policy in boot_policies_list:
                self.content_list.append(
                    UcsSystemBootPolicyReportSection(
                        order_id=self.report.get_current_order_id(),
                        parent=self,
                        boot_policy=boot_policy,
                        title=_("Boot Policy ") + boot_policy.name))
コード例 #21
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("vMedia Policies")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        vmedia_policies_list = []
        # Searching for all vMedia Policies
        for org in self.report.config.orgs:
            self.parse_org(org,
                           vmedia_policies_list,
                           element_to_parse="vmedia_policies")

        if vmedia_policies_list:
            for vmedia_policy in vmedia_policies_list:
                self.content_list.append(
                    UcsSystemVmediaPolicyReportSection(
                        order_id=self.report.get_current_order_id(),
                        parent=self,
                        vmedia_policy=vmedia_policy,
                        title=_("vMedia Policy ") + vmedia_policy.name))
コード例 #22
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("Scrub Policies")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        scrub_policies_list = []
        # Searching for all Scrub Policies
        for org in self.report.config.orgs:
            self.parse_org(org,
                           scrub_policies_list,
                           element_to_parse="scrub_policies")

        if scrub_policies_list:
            for scrub_policy in scrub_policies_list:
                self.content_list.append(
                    UcsSystemScrubPolicyReportSection(
                        order_id=self.report.get_current_order_id(),
                        parent=self,
                        scrub_policy=scrub_policy,
                        title=_("Scrub Policy ") + scrub_policy.name))
コード例 #23
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("Graphics Card Policies")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        graphics_card_policies_list = []
        # Searching for all Graphics Card Policies
        for org in self.report.config.orgs:
            self.parse_org(org,
                           graphics_card_policies_list,
                           element_to_parse="graphics_card_policies")

        if graphics_card_policies_list:
            for graphics_card_policy in graphics_card_policies_list:
                self.content_list.append(
                    UcsSystemGraphicsCardPolicyReportSection(
                        order_id=self.report.get_current_order_id(),
                        parent=self,
                        graphics_card_policy=graphics_card_policy,
                        title=_("Graphics Card Policy ") +
                        graphics_card_policy.name))
コード例 #24
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("Local Disk Configuration Policies")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        local_disk_config_policies = []
        # Searching for all Local Disk Config Policies
        for org in self.report.config.orgs:
            self.parse_org(org,
                           local_disk_config_policies,
                           element_to_parse="local_disk_config_policies")

        if local_disk_config_policies:
            for local_disk_config_policy in local_disk_config_policies:
                self.content_list.append(
                    UcsSystemLocalDiskConfigPolicyReportSection(
                        order_id=self.report.get_current_order_id(),
                        parent=self,
                        local_disk_config_policy=local_disk_config_policy,
                        title=_("Local Disk Config Policy ") +
                        local_disk_config_policy.name))
コード例 #25
0
    def __init__(self, order_id, parent, title=""):
        if not title:
            title = _("Maintenance Policies")
        UcsReportSection.__init__(self,
                                  order_id=order_id,
                                  parent=parent,
                                  title=title)

        maintenance_policies_list = []
        # Searching for all Maintenance Policies
        for org in self.report.config.orgs:
            self.parse_org(org,
                           maintenance_policies_list,
                           element_to_parse="maintenance_policies")

        if maintenance_policies_list:
            for maintenance_policy in maintenance_policies_list:
                self.content_list.append(
                    UcsSystemMaintenancePolicyReportSection(
                        order_id=self.report.get_current_order_id(),
                        parent=self,
                        maintenance_policy=maintenance_policy,
                        title=_("Maintenance Policy ") +
                        maintenance_policy.name))