Skip to content

Commit

Permalink
Revert of HLFv1-beta merge (hyperledger-archives#1252)
Browse files Browse the repository at this point in the history
* Fixed broken links in docs

* Reverting to the state of the project before merge of HLFv1-beta

* Revert "Merge branch 'master' into master"

This reverts commit ffe7770, reversing
changes made to f996f63.
  • Loading branch information
dselman authored and Simon Stone committed Jun 13, 2017
1 parent b114167 commit 3095dfb
Show file tree
Hide file tree
Showing 113 changed files with 2,490 additions and 2,890 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ jspm_packages
.DS_Store
*.swp

# vscode folder
.vscode

#generated jsdoc
packages/composer-website/jekylldocs/jsdoc/

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ matrix:
- env: DOCS=full FC_TASK=docs
- env: SYSTEST=embedded FC_TASK=systest
- env: SYSTEST=hlf FC_TASK=systest
- env: SYSTEST=hlfv1_tls FC_TASK=systest
- env: SYSTEST=hlfv1 FC_TASK=systest
- env: SYSTEST=proxy FC_TASK=systest
- env: SYSTEST=web FC_TASK=systest
dist: trusty
Expand Down
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}"
},
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
"args": [ "-t", "0", "systest" ],
"cwd": "${workspaceRoot}/packages/composer-systests",
"env": { "npm_lifecycle_event": "systest:embedded"}
}
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"eslint.enable": true,
"eslint.autoFixOnSave": true,
"vsicons.presets.angular": true
}
1 change: 0 additions & 1 deletion packages/composer-admin/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ class AdminConnection {
+ Promise update(BusinessNetworkDefinition)
+ Promise ping()
+ Promise list()
+ Promise importIdentity(string,string,string,string)
}
2 changes: 0 additions & 2 deletions packages/composer-admin/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#
# Note that the latest public API is documented using JSDocs and is available in api.txt.
#
Version 0.7.5 {3981adc1fb192a8e53d2250ea8feec9a} 2017-05-22
- added importIdentity method.

Version 0.3.7 {af35a7b1a5872beed588f70d3ee0f345} 2017-01-24
- Move to single version
Expand Down
26 changes: 0 additions & 26 deletions packages/composer-admin/lib/adminconnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,32 +318,6 @@ class AdminConnection {
return this.connection.list(this.securityContext);
}

/**
* import an identity into a profiles' wallet
*
* @param {string} connectionProfile Name of the connection profile
* @param {string} id The id to associate with this identity
* @param {string} publicKey The signer cert in PEM format
* @param {string} privateKey The private key in PEM format
* @returns {Promise} A promise which is resolved when the identity is imported
*
* @memberOf AdminConnection
*/
importIdentity(connectionProfile, id, publicKey, privateKey) {
let savedConnectionManager;
return this.connectionProfileManager.getConnectionManager(connectionProfile)
.then((connectionManager) => {
savedConnectionManager = connectionManager;
return this.getProfile(connectionProfile);
})
.then((profileData) => {
return savedConnectionManager.importIdentity(profileData, id, publicKey, privateKey);
})
.catch((error) => {
throw new Error('failed to import identity. ' + error.message);
});
}

}

module.exports = AdminConnection;
25 changes: 0 additions & 25 deletions packages/composer-admin/test/adminconnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ describe('AdminConnection', () => {
mockConnectionManager.connect.resolves(mockConnection);
adminConnection = new AdminConnection();
sinon.stub(adminConnection.connectionProfileManager, 'connect').resolves(mockConnection);
sinon.stub(adminConnection.connectionProfileManager, 'getConnectionManager').resolves(mockConnectionManager);
sinon.stub(adminConnection.connectionProfileStore, 'save').withArgs('testprofile', sinon.match.any).resolves();
sinon.stub(adminConnection.connectionProfileStore, 'load').withArgs('testprofile').resolves(config);
sinon.stub(adminConnection.connectionProfileStore, 'loadAll').resolves({ profile1: config, profile2: config2 });
Expand Down Expand Up @@ -254,28 +253,4 @@ describe('AdminConnection', () => {

});

describe('#importIdentity', () => {
it('should be able to import an identity', () => {
mockConnectionManager.importIdentity = sinon.stub();
adminConnection.connection = mockConnection;
adminConnection.securityContext = mockSecurityContext;
return adminConnection.importIdentity('testprofile', 'anid', 'acerttosign', 'akey')
.then(() => {
sinon.assert.calledOnce(mockConnectionManager.importIdentity);
sinon.assert.calledWith(mockConnectionManager.importIdentity, config, 'anid', 'acerttosign', 'akey');
});
});

it('should throw an error if import fails', () => {
mockConnectionManager.importIdentity = sinon.stub();
mockConnectionManager.importIdentity.rejects(new Error('no identity imported'));
adminConnection.connection = mockConnection;
adminConnection.securityContext = mockSecurityContext;
return adminConnection.importIdentity('testprofile', 'anid', 'acerttosign', 'akey')
.should.be.rejectedWith(/no identity imported/);
});


});

});
5 changes: 2 additions & 3 deletions packages/composer-cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ let results = yargs
.version(function() {
return getInfo('composer-cli')+
getInfo('composer-admin')+getInfo('composer-client')+
getInfo('composer-common')+getInfo('composer-runtime-hlf')+
getInfo('composer-connector-hlf')+getInfo('composer-runtime-hlfv1')+
getInfo('composer-connector-hlfv1');
getInfo('composer-common')+getInfo('composer-runtime')+
getInfo('composer-connector-hlfv1')+getInfo('composer-runtime-hlfv1');
})
.describe('v', 'show version information')
.command(
Expand Down
34 changes: 0 additions & 34 deletions packages/composer-cli/lib/cmds/identity/importCommand.js

This file was deleted.

65 changes: 0 additions & 65 deletions packages/composer-cli/lib/cmds/identity/lib/import.js

This file was deleted.

115 changes: 0 additions & 115 deletions packages/composer-cli/test/identity/import.js

This file was deleted.

14 changes: 0 additions & 14 deletions packages/composer-common/lib/connectionmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,6 @@ class ConnectionManager {
return Promise.reject(new Error('abstract function called'));
}

/**
* Import an identity into a profile wallet or keystore
*
* @param {object} profileDefinition the profile definition
* @param {string} id the id to associate with the identity
* @param {string} publicKey the public key
* @param {string} privateKey the private key
* @returns {Promise} a promise which resolves when the identity is imported
*
* @memberOf HLFConnectionManager
*/
importIdentity(profileDefinition, id, publicKey, privateKey) {
return Promise.reject(new Error('Import identity not supported by this connection profile'));
}
/**
* Stop serialization of this object.
* @return {Object} An empty object.
Expand Down
1 change: 1 addition & 0 deletions packages/composer-common/lib/connectionprofilemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class ConnectionProfileManager {
* @abstract
*/
connect(connectionProfile, businessNetworkIdentifier, additionalConnectOptions) {

LOG.info('connect','Connecting using ' + connectionProfile, businessNetworkIdentifier);

let connectOptions;
Expand Down
Loading

0 comments on commit 3095dfb

Please sign in to comment.