本文整理汇总了Python中MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi.connectRoom方法的典型用法代码示例。如果您正苦于以下问题:Python AdminApi.connectRoom方法的具体用法?Python AdminApi.connectRoom怎么用?Python AdminApi.connectRoom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi
的用法示例。
在下文中一共展示了AdminApi.connectRoom方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: connectRoom
# 需要导入模块: from MaKaC.plugins.Collaboration.Vidyo.api.api import AdminApi [as 别名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi import connectRoom [as 别名]
def connectRoom(cls, booking, roomId, extension):
confId = booking.getConference().getId()
bookingId = booking.getId()
try:
searchFilter = SOAPObjectFactory.createFilter('user', extension)
userApiAnswer = UserApi.search(searchFilter, confId, bookingId)
if userApiAnswer.total == 0:
return VidyoError("noExistsRoom", "connect", _("The conference room is not registered in the vidyo service. ") + VidyoTools.getContactSupportText())
legacyMember = userApiAnswer.Entity[0].entityID
AdminApi.connectRoom(roomId, confId, bookingId, legacyMember)
except WebFault, e:
faultString = e.fault.faultstring
if faultString.startswith('ConferenceID is invalid'):
return VidyoError("unknownRoom", "connect")
if faultString.startswith('Failed to Invite to Conference'):
message = _("The connection has failed. ") + VidyoTools.getContactSupportText()
return VidyoError("connectFailed", "connect", message)
else:
Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's connectRoom operation got WebFault: %s""" %
(confId, bookingId, e.fault.faultstring))
raise
示例2: connectRoom
# 需要导入模块: from MaKaC.plugins.Collaboration.Vidyo.api.api import AdminApi [as 别名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.api.AdminApi import connectRoom [as 别名]
def connectRoom(cls, booking, roomId, extension):
confId = booking.getConference().getId()
bookingId = booking.getId()
try:
searchFilter = SOAPObjectFactory.createFilter('user', extension)
userApiAnswer = UserApi.search(searchFilter, confId, bookingId)
legacyMember = userApiAnswer.Entity[0].entityID
AdminApi.connectRoom(roomId, confId, bookingId, legacyMember)
except WebFault, e:
faultString = e.fault.faultstring
if faultString.startswith('ConferenceID is invalid'):
return VidyoError("unknownRoom", "connect")
if faultString.startswith('Failed to Invite to Conference'):
message = _("The connection has failed.")
if getVidyoOptionValue("contactSupport"):
message += _("""\nPlease try again or contact %s for help.""")%getVidyoOptionValue("contactSupport")
return VidyoError("connectFailed", "connect", message)
else:
Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's connectRoom operation got WebFault: %s""" %
(confId, bookingId, e.fault.faultstring))
raise