Search in sources :

Example 1 with Flags

use of org.onap.appc.client.lcm.model.Flags in project so by onap.

the class ApplicationControllerClient method createRequestFlags.

public Flags createRequestFlags() {
    Flags flags = new Flags();
    flags.setTtl(6000);
    return flags;
}
Also used : Flags(org.onap.appc.client.lcm.model.Flags)

Example 2 with Flags

use of org.onap.appc.client.lcm.model.Flags in project so by onap.

the class ApplicationControllerClient method buildCommonHeader.

protected CommonHeader buildCommonHeader(String requestId, String requestorId) {
    CommonHeader commonHeader = new CommonHeader();
    commonHeader.setApiVer(API_VER);
    commonHeader.setOriginatorId(ORIGINATOR_ID);
    commonHeader.setRequestId(requestId == null ? UUID.randomUUID().toString() : requestId);
    commonHeader.setSubRequestId(UUID.randomUUID().toString());
    Flags flags = new Flags();
    String flagsMode = "NORMAL";
    Mode mode = Mode.valueOf(flagsMode);
    flags.setMode(mode);
    String flagsForce = "FALSE";
    Force force = Force.valueOf(flagsForce);
    flags.setForce(force);
    flags.setTtl(FLAGS_TTL);
    commonHeader.setFlags(flags);
    Instant timestamp = Instant.now();
    ZULU zulu = new ZULU(timestamp.toString());
    commonHeader.setTimestamp(zulu);
    return commonHeader;
}
Also used : CommonHeader(org.onap.appc.client.lcm.model.CommonHeader) Force(org.onap.appc.client.lcm.model.Flags.Force) Mode(org.onap.appc.client.lcm.model.Flags.Mode) Instant(java.time.Instant) Flags(org.onap.appc.client.lcm.model.Flags) ZULU(org.onap.appc.client.lcm.model.ZULU)

Example 3 with Flags

use of org.onap.appc.client.lcm.model.Flags in project so by onap.

the class ApplicationControllerClient method createRequestFlags.

public Flags createRequestFlags() {
    Flags flags = new Flags();
    flags.setTtl(6000);
    return flags;
}
Also used : Flags(org.onap.appc.client.lcm.model.Flags)

Example 4 with Flags

use of org.onap.appc.client.lcm.model.Flags in project so by onap.

the class ApplicationControllerClient method buildCommonHeader.

private CommonHeader buildCommonHeader(String requestId) {
    CommonHeader commonHeader = new CommonHeader();
    commonHeader.setApiVer(API_VER);
    commonHeader.setOriginatorId(ORIGINATOR_ID);
    commonHeader.setRequestId(requestId == null ? UUID.randomUUID().toString() : requestId);
    commonHeader.setSubRequestId(UUID.randomUUID().toString());
    Flags flags = new Flags();
    String flagsMode = "NORMAL";
    Mode mode = Mode.valueOf(flagsMode);
    flags.setMode(mode);
    String flagsForce = "FALSE";
    Force force = Force.valueOf(flagsForce);
    flags.setForce(force);
    flags.setTtl(FLAGS_TTL);
    commonHeader.setFlags(flags);
    ZULU zulu = new ZULU(generateCurrentTimestamp(this.controllerType));
    commonHeader.setTimestamp(zulu);
    return commonHeader;
}
Also used : CommonHeader(org.onap.appc.client.lcm.model.CommonHeader) Force(org.onap.appc.client.lcm.model.Flags.Force) Mode(org.onap.appc.client.lcm.model.Flags.Mode) Flags(org.onap.appc.client.lcm.model.Flags) ZULU(org.onap.appc.client.lcm.model.ZULU)

Aggregations

Flags (org.onap.appc.client.lcm.model.Flags)4 CommonHeader (org.onap.appc.client.lcm.model.CommonHeader)2 Force (org.onap.appc.client.lcm.model.Flags.Force)2 Mode (org.onap.appc.client.lcm.model.Flags.Mode)2 ZULU (org.onap.appc.client.lcm.model.ZULU)2 Instant (java.time.Instant)1