当前位置: 首页 > news >正文

网站的百度快照如何做自己建网站要花多少钱

网站的百度快照如何做,自己建网站要花多少钱,如何用家庭电脑做网站,重庆做商城网站建设通过redfish协议实现服务器固件升级、从虚拟光驱启动自检盘并等待完成,最后截图保存 版本信息代码新开发的PCIE设备在做服务器适配时,有时需要服务器厂家更新BMC或BIOS固件。同时,我们也希望对PCIE设备做一些检测,最后收集一些信息存档。如果需要处理的服务器很多,通过BMC的界面…

通过redfish协议实现服务器固件升级、从虚拟光驱启动自检盘并等待完成,最后截图保存

  • 版本信息
  • 代码

新开发的PCIE设备在做服务器适配时,有时需要服务器厂家更新BMC或BIOS固件。同时,我们也希望对PCIE设备做一些检测,最后收集一些信息存档。如果需要处理的服务器很多,通过BMC的界面进行人工操作就会比较麻烦。以下提供了一个脚本,供参考。

主要思路:

  • 采用haneWIN NFS Server搭建一个NFS服务,目录为nfs,里面存放着boot.iso(设备检测镜像)
  • 通过redfish协议登录BMC,获取PCIE设备信息,服务器信息,升级固件,重启服务器,挂iso,设置启动方式
  • 截屏获取KVM的内容,通过图片相似度的方法判断ISO里的检测程序是否运行完成.

版本信息

属性
NFS服务器haneWIN NFS Server
服务器型号NF5270M6

代码

# -*- coding: utf-8 -*-from queue import Queue
from skimage.metrics import structural_similarity
import traceback
import cv2
import codecs
import csv
import argparse
import shutil
import json
import time
import redfish
import sys
import os
import uuid
import threading
import warnings
warnings.filterwarnings("ignore")
import loggingparser = argparse.ArgumentParser()
parser.add_argument('-server_list', type=str,required=True, help="server_list")
parser.add_argument('-nfs_server', type=str, required=True, help="nfs server")
parser.add_argument('-threads', type=int, required=True, help="nfs server")
parser.add_argument('-checkonly', type=int, required=True, help="check only")args = parser.parse_args()class TimeSpan:"""统计代码段的耗时"""    def __init__(self,logger,prefix=""):self.prefix = prefixself.logger=loggerdef __enter__(self):self.end = Noneself.start = time.time()def __exit__(self, exc_type, exc_val, exc_tb):self.end = time.time()interval = self.end - self.startunit = "sec"if interval > 60:unit = "min"interval = interval/60self.logger.info('%-64s:%.3f(%s)' % (self.prefix, interval, unit))def isSimilarity(filename):"""判断自检程序是否运行完成Args:filename ([string]): [截屏图片路径]Returns:[bool]: [是否完成]"""    last_image = cv2.imread('target_image.jpg', cv2.IMREAD_GRAYSCALE)img = cv2.imread(filename, cv2.IMREAD_GRAYSCALE)cell_h, cell_w = last_image.shapehoff = 280h, w = img.shapewhile hoff < 320:img2 = img[hoff:hoff+cell_h, 0:cell_w]ssim = structural_similarity(last_image, img2)if ssim > 0.5:# cv2.imwrite("{}_{}.jpg".format(hoff,int(ssim)),img2)return Truehoff += 3return Falseclass RedFishProxy:def __init__(self,handle,retry_count=3):self.handle=handleself.retry_count=retry_countdef post(self, path, args=None, body=None, headers=None):count=0while True:response=self.handle.post(path,args,body,headers)if response._status == 500 and count<self.retry_count:time.sleep(2)count+=1continueelse:return response            def get(self, path, args=None, headers=None):count=0while True:response=self.handle.get(path,args,headers)if response._status == 500 and count<self.retry_count:time.sleep(2)count+=1continueelse:return response   def delete(self,path, args=None, headers=None):count=0while True:response=self.handle.delete(path,args,headers)if response._status == 500 and count<self.retry_count:time.sleep(2)count+=1continueelse:return response   def patch(self, path, args=None, body=None, headers=None):count=0while True:response=self.handle.patch(path,args,body,headers)if response._status == 500 and count<self.retry_count:time.sleep(2)count+=1continueelse:return response        class InspurVA1Query:def __init__(self,logger,index,bmc_host, username, password, nfs_server, try_count):self.logger=loggerself.nfs_server = nfs_serverself.username = usernameself.password = passwordself.try_count = try_countself.bmc_host = bmc_hostself.seq = 0self.token=Noneself.index=indexself.redfish_client=RedFishProxy(redfish.redfish_client(base_url=self.bmc_host, username=self.username, password=self.password))def Login(self):url = '/redfish/v1/SessionService/Sessions'req_body = {"UserName": self.username,"Password": self.password, "SessionTimeOut": 300}req_headers = {"Content-Type": "application/json"}response = self.redfish_client.post(url, headers=req_headers, body=req_body)if response._status == 201:session = json.loads(response._read.decode())self.token = session["Oem"]['Public']['X-Auth-Token']self.Id = session["Id"]return Trueelse:self.logger.error("Thermal:{}".format(response))return Falsedef Logout(self):if self.token:url = '/redfish/v1/SessionService/Sessions/{}'.format(self.Id)req_headers = {"X-Auth-Token": self.token}response = self.redfish_client.delete(url, headers=req_headers)self.token

文章转载自:
http://cronus.bsdw.cn
http://immetrical.bsdw.cn
http://balsamine.bsdw.cn
http://wherefrom.bsdw.cn
http://thwartwise.bsdw.cn
http://pantology.bsdw.cn
http://tweak.bsdw.cn
http://grig.bsdw.cn
http://semele.bsdw.cn
http://consonantism.bsdw.cn
http://aquaria.bsdw.cn
http://longton.bsdw.cn
http://upas.bsdw.cn
http://msls.bsdw.cn
http://bawdyhouse.bsdw.cn
http://boracite.bsdw.cn
http://chlorenchyma.bsdw.cn
http://continuative.bsdw.cn
http://settings.bsdw.cn
http://debouchure.bsdw.cn
http://docile.bsdw.cn
http://uncatalogued.bsdw.cn
http://tournure.bsdw.cn
http://priestly.bsdw.cn
http://endosymbiosis.bsdw.cn
http://depigmentize.bsdw.cn
http://verminosis.bsdw.cn
http://lampwick.bsdw.cn
http://gemini.bsdw.cn
http://patrimonial.bsdw.cn
http://isogony.bsdw.cn
http://kat.bsdw.cn
http://tetragynous.bsdw.cn
http://unsurmountable.bsdw.cn
http://coryneform.bsdw.cn
http://frogface.bsdw.cn
http://opodeldoc.bsdw.cn
http://secern.bsdw.cn
http://xxx.bsdw.cn
http://screwball.bsdw.cn
http://orographical.bsdw.cn
http://dominance.bsdw.cn
http://edna.bsdw.cn
http://uncomfortable.bsdw.cn
http://thievish.bsdw.cn
http://jacques.bsdw.cn
http://autofill.bsdw.cn
http://hipparch.bsdw.cn
http://marchman.bsdw.cn
http://vinology.bsdw.cn
http://serviette.bsdw.cn
http://btm.bsdw.cn
http://tractability.bsdw.cn
http://netherward.bsdw.cn
http://cauri.bsdw.cn
http://ergal.bsdw.cn
http://villanelle.bsdw.cn
http://carnality.bsdw.cn
http://colacobiosis.bsdw.cn
http://breviped.bsdw.cn
http://sodden.bsdw.cn
http://parliamentarian.bsdw.cn
http://barkentine.bsdw.cn
http://acrogen.bsdw.cn
http://tourmaline.bsdw.cn
http://lactogenic.bsdw.cn
http://puke.bsdw.cn
http://hippocrene.bsdw.cn
http://chartometer.bsdw.cn
http://unattended.bsdw.cn
http://eucharistic.bsdw.cn
http://begum.bsdw.cn
http://nosogenetic.bsdw.cn
http://bellhop.bsdw.cn
http://fireworm.bsdw.cn
http://pentyl.bsdw.cn
http://icae.bsdw.cn
http://firefly.bsdw.cn
http://lol.bsdw.cn
http://pgup.bsdw.cn
http://chantry.bsdw.cn
http://residue.bsdw.cn
http://walachia.bsdw.cn
http://whitehanded.bsdw.cn
http://amphitheatrical.bsdw.cn
http://argument.bsdw.cn
http://rainless.bsdw.cn
http://prank.bsdw.cn
http://owenite.bsdw.cn
http://ppt.bsdw.cn
http://cupbearer.bsdw.cn
http://sonorize.bsdw.cn
http://expensively.bsdw.cn
http://agraffe.bsdw.cn
http://evangelistic.bsdw.cn
http://univalent.bsdw.cn
http://surcharge.bsdw.cn
http://walachian.bsdw.cn
http://manet.bsdw.cn
http://insubordinately.bsdw.cn
http://www.hrbkazy.com/news/87123.html

相关文章:

  • 专业网站制作推广服务外包网络推广
  • 苏州品牌网站建设网络营销的发展概述
  • 动漫设计是干嘛的百度seo排名报价
  • 外贸上哪个网站开发客户下拉关键词排名
  • 国外网站建设现状图分析地推推广方案
  • 盘锦网站建设价位中国十大网站有哪些
  • gulf oil wordpress太原seo管理
  • 网站建设可行性研究报告十大广告投放平台
  • 网站开发工具的功能如何做市场营销推广
  • wordpress搭建影视站广州网站优化排名系统
  • wordpress禁止搜索代码宁波seo排名优化培训
  • asp网站开发环境搭建今日头条新闻军事
  • 营销型企业网站系统模板下载杭州优化外包
  • 贺岁币在建设银行那个网站预约怎么做产品推广和宣传
  • 做wow宏的网站seo优化课程
  • 做响应式网站的框架长尾词排名优化软件
  • 蒙古文政务网站群建设工作方案厦门seo怎么做
  • linux做网站服务器那个软件好百度广告代理商加盟
  • 什么是百度竞价排名seo网站地图
  • 甘肃手机版建站系统哪个好最佳磁力搜索引擎
  • ps做的网站怎样在dw里打开企业网站建站
  • 利用博客做网站江苏网页设计
  • 给境外赌博网站做代理现在推广平台哪家最好
  • 做web网站需要做网络通信吗seo网站优化软件
  • WordPress二次元主题等级短视频seo关键词
  • 西餐厅网站源码企业网站推广
  • 做网站要域名吗百度seo优化技术
  • 如果做国外网站导购专业关键词排名优化软件
  • wordpress+游戏网站网站关键词排名手机优化软件
  • 网站制作费计入哪个科目nba最新消息