$newline"; echo "$tab$message call failed.$newline"; echo "$newline"; logoff( $user ); exit(); } } echo "$newline"; $username = $_POST['user']; $password = $_POST['password']; // We first need to login // // $user = status_login( $_SERVER[REMOTE_HOST], $_SERVER[REMOTE_ADDR], $_POST['LDAPDomain'], session_id() ); $user = @login( $username, $password, $_SERVER[REMOTE_HOST], $_SERVER[REMOTE_ADDR], $_POST['LDAPDomain'], session_id() ); @checkError( $user, "login()" ); // Lets get all the information we need // $librarySummaryInfo = @get_library_summary_info( $user ); @checkError( $librarySummaryInfo, "get_library_summary_info()" ); $productInfo = @get_product_info( $user ); @checkError( $productInfo, "get_product_info()" ); $chassis = @get_chassis( $user ); @checkError( $chassis, "get_chassis()" ); $licenseInfo = @get_licensable_features( $user ); @checkError( $licenseInfo, "get_licensable_features()" ); $networkInfoIPv4 = @get_network_configuration_ipv4( $user ); @checkError( $networkInfoIPv4, "get_network_configuration_ipv4()" ); $networkInfoIPv6 = @get_all_ipv6_addresses( $user ); @checkError( $networkInfoIPv6, "get_all_ipv6_addresses()" ); $hostname = @get_network_hostname( $user ); @checkError( $hostname, "get_network_hostname()" ); $sortCriteria = new SortCriteria(1, "ASC","","*"); $partitions = @get_logical_libraries($user, $sortCriteria); @checkError( $partitions, "get_logical_libraries()" ); $sortCriteria = new SortCriteria(); $sortCriteria->sortColumn = 3; $sortCriteria->ascending = 1; $sortCriteria->filterPattern = "*"; $drives = @get_all_drives_ex($user, $sortCriteria); @checkError( $drives, "get_all_drives_ex()" ); $ioBlades = @get_blades($user); @checkError( $ioBlades, "get_blades()" ); $rasStatus = @get_subsystem_status($user); @checkError( $rasStatus, "get_subsystem_status()" ); $sortCriteria = new SortCriteria(); $sortCriteria->ascending = true; $subsystem = "all"; $state = 4; // 1=UnOpen 2=Open 3=Closed 4=All (Open and Unopend) $ticketPriority = array( "Unspecified", "Low", "High", "Urgent" ); $tickets = @get_ras_tickets($user, $sortCriteria, $state, $subsystem, false); @checkError( $tickets, "get_ras_tickets()" ); echo "${newline}"; // Report Produce Information // echo "$tab$newline"; echo "$tab$tabScalar i500$newline"; echo "$tab$tab$productInfo->serialnumber$newline"; echo "$tab$tabFW: $productInfo->productversion, BSP: $productInfo->bsp_level$newline"; echo "$tab$tabDATE: $productInfo->lastupdate$newline"; echo "$tab$tab$hostname$newline"; echo "$tab$tab$newline"; echo "$tab$tab$tabIPv4$newline"; echo "$tab$tab$tab$networkInfoIPv4->ip$newline"; echo "$tab$tab$newline"; foreach( $networkInfoIPv6 as $item ) { echo "$tab$tab$newline"; echo "$tab$tab$tabIPv6$newline"; echo "$tab$tab$tab$item$newline"; echo "$tab$tab$newline"; } // Report Module/Chassis Information foreach( $chassis as $item ) { echo "$tab$tab$newline"; echo "$tab$tab$tab$item->model$newline"; echo "$tab$tab$tab$item->serial$newline"; echo "$tab$tab$tab$item->location$newline"; echo "$tab$tab$newline"; } // Report Licenses Information echo "$tab$tab$newline"; foreach( $licenseInfo as $item ) { echo "$tab$tab$tab$newline"; echo "$tab$tab$tab$tab$item->Descriptor$newline"; echo "$tab$tab$tab$tab$item->Value$newline"; echo "$tab$tab$tab$newline"; } echo "$tab$tab$newline"; // Report Resource Count Information echo "$tab$tab$librarySummaryInfo->slot_count$newline"; echo "$tab$tab$librarySummaryInfo->drive_count$newline"; echo "$tab$tab$librarySummaryInfo->media_count$newline"; echo "$tab$tab$librarySummaryInfo->mailbox_count$newline"; echo "$tab$tab$librarySummaryInfo->partition_count$newline"; echo "$tab$newline"; // Report Partition Information if( count( $partitions ) > 0 ) { echo "$tab$newline"; foreach( $partitions as $item ) { echo "$tab$tab$newline"; echo "$tab$tab$tab$item->name$newline"; echo "$tab$tab$tab$item->status$newline"; echo "$tab$tab$tab$item->serialNumber$newline"; echo "$tab$tab$tab$item->totalDrives$newline"; echo "$tab$tab$tab$item->totalSlots$newline"; echo "$tab$tab$tab$item->totalMedia$newline"; echo "$tab$tab$newline"; } echo "$tab$newline"; } // Report Drive Information if( count( $drives ) > 0 ) { echo "$tab$newline"; foreach( $drives as $item ) { echo "$tab$tab$newline"; echo "$tab$tab$tab$item->name$newline"; echo "$tab$tab$tab$item->location$newline"; echo "$tab$tab$tab$item->status$newline"; if( $item->isReady == 1 ) echo "$tab$tab$tabReady$newline"; else echo "$tab$tab$tabNot Ready$newline"; echo "$tab$tab$tab".trim($item->serialNumber)."$newline"; echo "$tab$tab$tab$item->vendor$newline"; echo "$tab$tab$tab".trim($item->model)."$newline"; if( strcmp( $item->interfaceType, "Fibre" ) == 0 || strcmp( $item->interfaceType, "SAS" ) == 0 ) { echo "$tab$tab$tab$item->wwpn$newline"; } else { echo "$tab$tab$tab$item->scsiId$newline"; } echo "$tab$tab$tab$item->interfaceType$newline"; echo "$tab$tab$tab$item->mediaType$newline"; echo "$tab$tab$tab$item->fwVersion$newline"; echo "$tab$tab$tab$item->sledBootVersion$newline"; echo "$tab$tab$tab$item->sledAppVersion$newline"; echo "$tab$tab$newline"; } echo "$tab$newline"; } // Report Blade Information $bladeStatus = array( "Unknown", "Not Ready", "Booting", "Auto Leveling", "Auto Leveling Complete", "Auto Level Failed", "Ready", "Powered Down" ); $portStatus = array( "Configure Wait", "Loop Init", "Login", "Ready", "Lost Sync", "Error", "Reinit", "NonPart", "Failed" ); if( count( $ioBlades ) > 0 ) { echo "$tab$newline"; foreach( $ioBlades as $item ) { echo "$tab$tab$newline"; echo "$tab$tab$tab$item->id$newline"; echo "$tab$tab$tab$item->location$newline"; echo "$tab$tab$tab".trim($item->serial)."$newline"; echo "$tab$tab$tab$item->wwnn$newline"; echo "$tab$tab$tab$item->fw_ver$newline"; echo "$tab$tab$tab".$bladeStatus[$item->status % 8]."$newline"; $ports = @get_blade_ports($user, $item->id ); if( count( $ports ) > 0 && isset( $ports ) ) { echo "$tab$tab$tab$newline"; foreach( $ports as $port ) { echo "$tab$tab$tab$tab$newline"; echo "$tab$tab$tab$tab$tab$port->portNum$newline"; echo "$tab$tab$tab$tab$tab".$portStatus[$port->status % 9]."$newline"; echo "$tab$tab$tab$tab$tab$port->wwnn$newline"; echo "$tab$tab$tab$tab$newline"; } echo "$tab$tab$tab$newline"; } echo "$tab$tab$newline"; } echo "$tab$newline"; } // RAS Information echo "$tab$newline"; echo "$tab$tab".$componentStatus[$rasStatus->power]."$newline"; echo "$tab$tab".$componentStatus[$rasStatus->connectivity]."$newline"; echo "$tab$tab".$componentStatus[$rasStatus->robotics % 4]."$newline"; echo "$tab$tab".$componentStatus[$rasStatus->control % 4]."$newline"; echo "$tab$tab".$componentStatus[$rasStatus->cooling % 4]."$newline"; echo "$tab$tab".$componentStatus[$rasStatus->library % 4]."$newline"; echo "$tab$tab".$componentStatus[$rasStatus->drives % 4]."$newline"; echo "$tab$tab".$componentStatus[$rasStatus->media % 4]."$newline"; echo "$tab$newline"; // Ticket Information if( count( $tickets ) > 0 ) { echo "$tab$newline"; foreach( $tickets as $item ) { echo "$tab$tab$newline"; echo "$tab$tab$tab$item->ticketNumber$newline"; echo "$tab$tab$tab$item->createTime$newline"; echo "$tab$tab$tab$item->description$newline"; echo "$tab$tab$tab$item->state$newline"; echo "$tab$tab$tab".$ticketPriority[$item->priority % 4]."$newline"; echo "$tab$tab$newline"; } echo "$tab$newline"; } echo "$newline"; // Logoff the User. @logoff( $user ); ?>