(self, type, org, node)
return msp, tls, cfg
msp and tls , cfg from zip file to byte

        :param org: organization name
        :param type: node type
        :param node: node name
        :return: msp, tls, cfg
        :rtype: bytes
msp and tls , cfg from zip file to byte
msp and tls cfg from zip file to byte
def _conversion_msp_tls_cfg(self, type, org, node):
        """
        msp and tls , cfg from zip file to byte

        :param org: organization name
        :param type: node type
        :param node: node name
        :return: msp, tls, cfg
        :rtype: bytes
        """
        try:
            if type == "peer":
                dir_node = "{}/{}/crypto-config/peerOrganizations/{}/peers/{}/" \
                    .format(CELLO_HOME, org, org, node + "." + org)
                name = "core.yaml"
                cname = "peer_config.zip"
            else:
                dir_node = "{}/{}/crypto-config/ordererOrganizations/{}/orderers/{}/" \
                    .format(CELLO_HOME, org, org.split(".", 1)[1], node + "." + org.split(".", 1)[1])
                name = "orderer.yaml"
                cname = "orderer_config.zip"

            zip_dir("{}msp".format(dir_node), "{}msp.zip".format(dir_node))
            with open("{}msp.zip".format(dir_node), "rb") as f_msp:
                msp = base64.b64encode(f_msp.read())

            zip_dir("{}tls".format(dir_node), "{}tls.zip".format(dir_node))
            with open("{}tls.zip".format(dir_node), "rb") as f_tls:
                tls = base64.b64encode(f_tls.read())

            zip_file("{}{}".format(dir_node, name), "{}{}".format(dir_node, cname))
            with open("{}{}".format(dir_node, cname), "rb") as f_cfg:
                cfg = base64.b64encode(f_cfg.read())
        except Exception as e:
            raise e

        return msp, tls, cfg
def _conversion_msp_tls_cfg ( self , type , org , node ) : try : if type == "peer" : dir_node = "{}/{}/crypto-config/peerOrganizations/{}/peers/{}/" . format ( CELLO_HOME , org , org , node + "." + org ) name = "core.yaml" cname = "peer_config.zip" else : dir_node = "{}/{}/crypto-config/ordererOrganizations/{}/orderers/{}/" . format ( CELLO_HOME , org , org . split ( "." , 1 ) [ 1 ] , node + "." + org . split ( "." , 1 ) [ 1 ] ) name = "orderer.yaml" cname = "orderer_config.zip" zip_dir ( "{}msp" . format ( dir_node ) , "{}msp.zip" . format ( dir_node ) ) with open ( "{}msp.zip" . format ( dir_node ) , "rb" ) as f_msp : msp = base64 . b64encode ( f_msp . read ( ) ) zip_dir ( "{}tls" . format ( dir_node ) , "{}tls.zip" . format ( dir_node ) ) with open ( "{}tls.zip" . format ( dir_node ) , "rb" ) as f_tls : tls = base64 . b64encode ( f_tls . read ( ) ) zip_file ( "{}{}" . format ( dir_node , name ) , "{}{}" . format ( dir_node , cname ) ) with open ( "{}{}" . format ( dir_node , cname ) , "rb" ) as f_cfg : cfg = base64 . b64encode ( f_cfg . read ( ) ) except Exception as e : raise e return msp , tls , cfg