Examples of VerifierNone


Examples of org.apache.hadoop.oncrpc.security.VerifierNone

    xdr.writeBoolean(value);
    return xdr;
  }

  public static XDR pmapList(XDR xdr, int xid, Collection<PortmapMapping> list) {
    RpcAcceptedReply.getAcceptInstance(xid, new VerifierNone()).write(xdr);
    for (PortmapMapping mapping : list) {
      System.out.println(mapping);
      xdr.writeBoolean(true); // Value follows
      mapping.serialize(xdr);
    }
View Full Code Here

Examples of org.apache.hadoop.oncrpc.security.VerifierNone

    XDR request = new XDR();
    RpcCall call = RpcCall.getInstance(
        RpcUtil.getNewXid(String.valueOf(RpcProgramPortmap.PROGRAM)),
        RpcProgramPortmap.PROGRAM, RpcProgramPortmap.VERSION,
        Procedure.PMAPPROC_SET.getValue(), new CredentialsNone(),
        new VerifierNone());
    call.write(request);
    return mapping.serialize(request);
  }
View Full Code Here

Examples of org.apache.hadoop.oncrpc.security.VerifierNone

  }
 
  /** Response for RPC call {@link MountInterface.MNTPROC#MNT} */
  public static XDR writeMNTResponse(int status, XDR xdr, int xid,
      byte[] handle) {
    RpcAcceptedReply.getAcceptInstance(xid, new VerifierNone()).write(xdr);
    xdr.writeInt(status);
    if (status == MNT_OK) {
      xdr.writeVariableOpaque(handle);
      // Only MountV3 returns a list of supported authFlavors
      xdr.writeInt(1);
View Full Code Here

Examples of org.apache.hadoop.oncrpc.security.VerifierNone

    return xdr;
  }

  /** Response for RPC call {@link MountInterface.MNTPROC#DUMP} */
  public static XDR writeMountList(XDR xdr, int xid, List<MountEntry> mounts) {
    RpcAcceptedReply.getAcceptInstance(xid, new VerifierNone()).write(xdr);
    for (MountEntry mountEntry : mounts) {
      xdr.writeBoolean(true); // Value follows yes
      xdr.writeString(mountEntry.host());
      xdr.writeString(mountEntry.path());
    }
View Full Code Here

Examples of org.apache.hadoop.oncrpc.security.VerifierNone

  /** Response for RPC call {@link MountInterface.MNTPROC#EXPORT} */
  public static XDR writeExportList(XDR xdr, int xid, List<String> exports,
      List<NfsExports> hostMatcher) {
    assert (exports.size() == hostMatcher.size());

    RpcAcceptedReply.getAcceptInstance(xid, new VerifierNone()).write(xdr);
    for (int i = 0; i < exports.size(); i++) {
      xdr.writeBoolean(true); // Value follows - yes
      xdr.writeString(exports.get(i));

      // List host groups
View Full Code Here

Examples of org.apache.hadoop.oncrpc.security.VerifierNone

  }

  static void createPortmapXDRheader(XDR xdr_out, int procedure) {
    // Make this a method
    RpcCall.getInstance(0, 100000, 2, procedure, new CredentialsNone(),
        new VerifierNone()).write(xdr_out);
  }
View Full Code Here

Examples of org.apache.hadoop.oncrpc.security.VerifierNone

    @Override
    protected void handleInternal(ChannelHandlerContext ctx, RpcInfo info) {
      resultSize = info.data().readableBytes();
      RpcAcceptedReply reply = RpcAcceptedReply.getAcceptInstance(1234,
          new VerifierNone());
      XDR out = new XDR();
      reply.write(out);
      ChannelBuffer b = ChannelBuffers.wrappedBuffer(out.asReadOnlyWrap().buffer());
      RpcResponse rsp = new RpcResponse(b, info.remoteAddress());
      RpcUtil.sendRpcResponse(ctx, rsp);
View Full Code Here

Examples of org.apache.hadoop.oncrpc.security.VerifierNone

  }
 
  @Test
  public void testRpcReply() {
    RpcReply reply = new RpcReply(0, ReplyState.MSG_ACCEPTED,
        new VerifierNone()) {
          @Override
          public XDR write(XDR xdr) {
            return null;
          }
    };
View Full Code Here

Examples of org.apache.hadoop.oncrpc.security.VerifierNone

  public void testRegistration() throws IOException, InterruptedException {
    XDR req = new XDR();
    RpcCall.getInstance(++xid, RpcProgramPortmap.PROGRAM,
        RpcProgramPortmap.VERSION,
        RpcProgramPortmap.PMAPPROC_SET,
        new CredentialsNone(), new VerifierNone()).write(req);

    PortmapMapping sent = new PortmapMapping(90000, 1,
        PortmapMapping.TRANSPORT_TCP, 1234);
    sent.serialize(req);
View Full Code Here

Examples of org.apache.hadoop.oncrpc.security.VerifierNone

    AcceptState.fromValue(6);
  }
 
  @Test
  public void testConstructor() {
    Verifier verifier = new VerifierNone();
    RpcAcceptedReply reply = new RpcAcceptedReply(0,
        ReplyState.MSG_ACCEPTED, verifier, AcceptState.SUCCESS);
    assertEquals(0, reply.getXid());
    assertEquals(RpcMessage.Type.RPC_REPLY, reply.getMessageType());
    assertEquals(ReplyState.MSG_ACCEPTED, reply.getState());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.