gpt4 book ai didi

org.zstack.header.zone.ZoneInventory.getUuid()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 23:47:31 26 4
gpt4 key购买 nike

本文整理了Java中org.zstack.header.zone.ZoneInventory.getUuid()方法的一些代码示例,展示了ZoneInventory.getUuid()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneInventory.getUuid()方法的具体详情如下:
包路径:org.zstack.header.zone.ZoneInventory
类名称:ZoneInventory
方法名:getUuid

ZoneInventory.getUuid介绍

暂无

代码示例

代码示例来源:origin: zstackio/zstack

@Override
  public String call(ZoneInventory arg) {
    return arg.getUuid();
  }
});

代码示例来源:origin: zstackio/zstack

@Override
  public String call(ZoneInventory arg) {
    return arg.getUuid();
  }
});

代码示例来源:origin: zstackio/zstack

@Override
  public String call(ZoneInventory arg) {
    return arg.getUuid();
  }
});

代码示例来源:origin: zstackio/zstack

@Override
  public String call(ZoneInventory arg) {
    return arg.getUuid();
  }
});

代码示例来源:origin: zstackio/zstack

void preDelete(ZoneInventory zinv) throws ZoneException {
  for (ZoneDeleteExtensionPoint extp : delExts) {
    try {
      extp.preDeleteZone(zinv);
    } catch (ZoneException ze) {
      logger.debug(String.format("extension[%s] refused to delete zone[name: %s, uuid:%s] because %s", extp.getClass().getName(), zinv.getName(), zinv.getUuid(), ze.getMessage()));
      throw ze;
    } catch (Exception e) {
      logger.warn("Exception happened while calling " + extp.getClass().getCanonicalName() + ".preDelete, " + "zone name: " + zinv.getName()
          + " uuid: " + zinv.getUuid(), e);
    }
  }
}

代码示例来源:origin: zstackio/zstack

@Override
  public Result audit(APIMessage msg, APIEvent rsp) {
    return new Result(rsp.isSuccess() ? ((APICreateZoneEvent)rsp).getInventory().getUuid() : "", ZoneVO.class);
  }
}

代码示例来源:origin: zstackio/zstack

@Override
  public void run(List<MessageReply> replies) {
    if (!action.isActionCode(CascadeConstant.DELETION_FORCE_DELETE_CODE)) {
      for (MessageReply r : replies) {
        if (!r.isSuccess()) {
          completion.fail(r.getError());
          return;
        }
      }
    }
    List<String> uuids = new ArrayList<String>();
    for (MessageReply r : replies) {
      ZoneInventory inv = zones.get(replies.indexOf(r));
      uuids.add(inv.getUuid());
      logger.debug(String.format("delete zone[uuid:%s, name:%s]", inv.getUuid(), inv.getName()));
    }
    dbf.removeByPrimaryKeys(uuids, ZoneVO.class);
    completion.success();
  }
});

代码示例来源:origin: zstackio/zstack

void preChange(ZoneVO vo, ZoneStateEvent event) throws ZoneException {
  ZoneInventory zinv = ZoneInventory.valueOf(vo);
  ZoneState next = AbstractZone.getNextState(vo.getState(), event);
  for (ZoneChangeStateExtensionPoint extp : changeExts) {
    try {
      extp.preChangeZoneState(zinv, event, next);
    } catch (ZoneException ze) {
      logger.debug(String.format("Extension: %s refused zone change state operation[ZoneStateEvent:%s] because %s", extp.getClass()
          .getCanonicalName(), event, ze.getMessage()));
      throw ze;
    } catch (Exception e) {
      logger.warn("Exception happened while calling " + extp.getClass().getCanonicalName() + ".preChangeZoneState(), " + "zone name: " + zinv.getName()
          + " uuid: " + zinv.getUuid(), e);
    }
  }
}

代码示例来源:origin: zstackio/zstack

ZoneDeletionMsg msg = new ZoneDeletionMsg();
msg.setForceDelete(action.isActionCode(CascadeConstant.DELETION_FORCE_DELETE_CODE));
msg.setZoneUuid(z.getUuid());
bus.makeTargetServiceIdByResourceUuid(msg, ZoneConstant.SERVICE_ID, z.getUuid());
msgs.add(msg);

代码示例来源:origin: zstackio/zstack

@Override
  public void after(APIEvent evt) {
    if (evt.isSuccess()) {
      ntfy("Created").resource(((APICreateZoneEvent)evt).getInventory().getUuid(), ZoneVO.class.getSimpleName())
          .messageAndEvent(that, evt).done();
    }
  }
};

代码示例来源:origin: zstackio/zstack

@Override
public void preChangeZoneState(ZoneInventory inventory, ZoneStateEvent event, ZoneState nextState) throws ZoneException {
  if (!event.toString().equals(ClusterStateEvent.disable.toString()) && !event.toString().equals(ClusterStateEvent.enable.toString())) {
    logger.debug("Unsupported ZoneStateEvent: " + event + ", won't propgate to extensions of cluster");
    return;
  }
  ClusterStateEvent clusterEvent = ClusterStateEvent.valueOf(event.toString());
  List<ClusterVO> vos = findClusterUnderZone(inventory.getUuid());
  try {
    extpEmitter.preChange(vos, clusterEvent);
  } catch (ClusterException e) {
    throw new ZoneException(e.getMessage(), e);
  }
}

代码示例来源:origin: zstackio/zstack

List<ClusterVO> vos = findClusterUnderZone(inventory.getUuid());
if (!vos.isEmpty()) {
  ClusterStateEvent clusterEvent = ClusterStateEvent.valueOf(event.toString());
  logger.debug("Changing state of clusters in zone: " + inventory.getName() + " uuid: " + inventory.getUuid() + " by event: " + clusterEvent);
  List<MessageReply> replies = bus.call(msgs);
  for (MessageReply r : replies) {

代码示例来源:origin: zstackio/zstack

@Override
public String call(L3NetworkInventory arg) {
  return arg.getUuid();

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com