Esempio n. 1
0
def queryExecuteOta(SNList, showprint=True):
    query = """
mutation {
executeOta(serialNumberList:"%s")
}
           """ % SNList
    return queryGraphql(query, api, showprint)
Esempio n. 2
0
def queryMainboardFirmwareList(showprint=True):
    query = """
query MainboardFirmwareList {
MainboardFirmwareList
}
    """
    return queryGraphql(query, api, showprint)
Esempio n. 3
0
def queryOta(showprint=True):
    query = """
    query{
    Ota{version, notes}
}
    """
    return queryGraphql(query, api, showprint)
Esempio n. 4
0
def queryDeletePanelTags(serialNumber, tagId, showprint=True):
    query = """
mutation{
deletePanelTags(deletePanelTagsRequest:{serialNumber:"%s",tagId:"%s"})
}
               """ % (serialNumber, tagId)
    return queryGraphql(query, api, showprint)
Esempio n. 5
0
def queryModelList(showprint=True):
    query = """
query ModelList{
    ModelList
}
    """
    return queryGraphql(query, api, showprint)
Esempio n. 6
0
def queryReapply(configurationId, showprint=True):
    query = """
mutation
{
reapply(configurationId:"%s",isDelayed:true)
}
        """ % configurationId
    return queryGraphql(query, api, showprint)
Esempio n. 7
0
def queryExecuteAppInstall(serialNumbers, url, showprint=True):
    query = """
mutation executeAppInstall {
executeAppInstall(appInstallRequest:{serialNumbers:"%s",url:"%s"}) {
    result
}
}
    """ % (serialNumbers, url)
    return queryGraphql(query, api, showprint)
Esempio n. 8
0
def queryIsUniqueConfigName(name, showprint=True):
    query = """
query{
    isUniqueConfigName(name: "%s"){
        unique
    }
}
    """ % name
    return queryGraphql(query, api, showprint)
Esempio n. 9
0
def queryDeleteConfiguration(configurationId, showprint=True):
    query = """
mutation{
deleteConfiguration(configurationId:"%s"){
success
    }
}
            """ % configurationId
    return queryGraphql(query, api, showprint)
Esempio n. 10
0
def queryUserList(showprint=True):
    query = """
query {
  UserList {
    user
    profileId
  }
}
    """
    return queryGraphql(query, api, showprint)
Esempio n. 11
0
def queryTags(showprint=True):
    query = """
query{
    Tags{
        group,
        values{id,value}
    }
}
    """
    return queryGraphql(query, api, showprint)
Esempio n. 12
0
def queryDeleteTag(tagid, showprint=True):
    query = """
mutation deleteTagById{
    deleteTag(id:"%s"){
        id,
        group,
        value
    }
}
    """ % tagid
    return queryGraphql(query, api, showprint)
Esempio n. 13
0
def queryCreateTag(group, tagname, showprint=True):
    query = """
mutation createTag {
createTag(group: "%s", value:"%s") {
    id
    value
    group
}
}
            """ % (group, tagname)
    return queryGraphql(query, api, showprint)
Esempio n. 14
0
def queryUnenroll(SN, showprint=True):
    query = """
mutation unenroll {
    unenroll(serialNumbers: "%s") {
    serialNumber,
    unenrolled,
    error
    }
}
            """ % SN
    return queryGraphql(query, api, showprint)
Esempio n. 15
0
def queryUpdateTag(tagid, group, value, showprint=True):
    query = """
mutation {
    updateTag(id:"%s", group:"%s", value:"%s") {
        id,
        group,
        value
    }
}
        """ % (tagid, group, value)
    return queryGraphql(query, api, showprint)
Esempio n. 16
0
def queryGetAppliedPanel(configurationId, showprint=True):
    query = """
query{
 getAppliedPanel(getDeployPanelRequest:{configurationId:"%s"}){
   panels{
    serialNumber,
    panelName,
  }
  }
}
            """ % configurationId
    return queryGraphql(query, api, showprint)
Esempio n. 17
0
def queryDeployConfiguration(serialNumber, configurationId, showprint=True):
    query = """
mutation
{
    deployConfiguration(deployRequest:{
        serialNumbers:"%s",
        configurationId:"%s",
        isDelayed:true
    })
}
            """ % (serialNumber, configurationId)
    return queryGraphql(query, api, showprint)
Esempio n. 18
0
def queryEnroll(SN, panelName, showprint=True):
    query = """
mutation enroll {
    enroll(input: [{ serialNumber: "%s", panelName: "%s" }]) {
        serialNumber
        panelName
        error
        enrolled
    }
}
            """ % (SN, panelName)
    return queryGraphql(query, api, showprint)
Esempio n. 19
0
def queryUpdateConfigurationPayload(configurationId,
                                    configKey,
                                    configPayload,
                                    showprint=True):
    query = """
mutation{
    updateConfigurationPayload(configurationId:"%s", input:{configKey:"%s", configPayload:%s}){
        configKey,
        configPayload,
    }
}
            """ % (configurationId, configKey, configPayload)
    return queryGraphql(query, api, showprint)
Esempio n. 20
0
def queryUpdatePanelName(serialNumber, name, showprint=True):
    query = """
mutation{
updatePanelName(updatePanelNameRequest:{serialNumber:"%s",name:"%s"}){
    name
    serialNumber
    model
    mainboardFirmware
    updateAvailable
    tagCount
    tags
}
}
        """ % (serialNumber, name)
    return queryGraphql(query, api, showprint)
Esempio n. 21
0
def queryConfigurationDetail(configurationId, showprint=True):
    query = """
query configurationDetail{
configurationDetail(configurationId: "%s"){
  configurationId
  name
  description
  orgId
  createBy
  createTime
  updateTime
  appliedPanels
  failedInstalls
}
}
        """ % configurationId
    return queryGraphql(query, api, showprint)
Esempio n. 22
0
def queryCreateConfiguration(name, description, showprint=True):
    query = """
mutation{
createConfiguration(input:{name:"%s" description:"%s"}){
        configurationId
        name
        description
        createBy
        orgId
        createTime
        updateTime
        status
        appliedPanels
        failedInstalls
        }
}
        """ % (name, description)
    return queryGraphql(query, api, showprint)
Esempio n. 23
0
def queryActivityLogs(serialNumber, profileIds="", pageSize=1, offset=0, showprint=True):
    query = """
query {
    ActivityLogs(searchActivityLog: {serialNumber:"%s", profileIds:"%s", pageSize:%s, offset:%s})
    {totalCount,
        logs{
          createTime,
          user,
          panelName,
          eventDetail,
          event,
          organization,
          status,
          serialNumber
        }
    }
}
            """ % (serialNumber, profileIds, pageSize, offset)
    return queryGraphql(query, api, showprint)
Esempio n. 24
0
def queryConfigurationList(pageNumber, pageSize, showprint=True):
    query = """
query configurationList{
    configurationList(input:{pageNumber:%d,pageSize:%d}){
        configurations{
            configurationId
            name
            description
            orgId
            createBy
            createTime
            updateTime
            appliedPanels
            failedInstalls
        }total
    }
}
            """ % (pageNumber, pageSize)
    return queryGraphql(query, api, showprint)
Esempio n. 25
0
def queryPanel(serialNumber, showprint=True):
    query = """
query getPanelBySN{
    Panel(serialNumber:"%s"){
        summary{name, serialNumber}
            bezelFirmware
            macAddress
            ipAddress
            tags{
            group
            groupId
            values{
            value
            id
            }
        }
    }
}
    """ % serialNumber
    return queryGraphql(query, api, showprint)
Esempio n. 26
0
def queryGetDeployConfig(serialNumber, showprint=True):
    query = """
query{
    getDeployConfig(getDeployConfigRequest:{serialNumber:"%s"}){
        configurationId,
        configurationName,
        description,
        createBy,
        orgId,
        createTime,
        updateTime,
        status,
        appliedPanels,
        failedInstalls,
        isUnique,
        deployStatus,
        deploymentTime,
        configurationPayload,
    }
}
            """ % serialNumber
    return queryGraphql(query, api, showprint)
Esempio n. 27
0
def queryPanels(pageSize, offset, showprint=True):
    query = """
query Panels{
    Panels(searchPanelsInput:{pageSize:%d,offset:%d}){
        panels{
            name,
            serialNumber,
            model,
            mainboardFirmware,
            updateAvailable,
            otaVersion,
            tagCount,
            tags,
            connectivity,
            connectivityTimestamp,
            otaStatus,
            status
        }totalCount
    }
}
    """ % (pageSize, offset)
    return queryGraphql(query, api, showprint)