Skip to content

Commit

Permalink
metadata: move models to Arsenal
Browse files Browse the repository at this point in the history
The models are the module BucketInfo, ObjectMD, WebsiteConfiguration and
ReplicationConfiguration.
These models are needed for the S3SOFS feature into the cdmiclient
repository. The S3 one does not export modules and shared ones are in
Arsenal so move these model modules to it.
  • Loading branch information
Jeremy Desanlis committed Jul 13, 2017
1 parent 3e187bb commit a2a773e
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 1,769 deletions.
2 changes: 1 addition & 1 deletion lib/api/apiUtils/bucket/bucketCreation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const async = require('async');
const { errors } = require('arsenal');

const acl = require('../../../metadata/acl');
const BucketInfo = require('../../../metadata/BucketInfo');
const BucketInfo = require('arsenal').models.BucketInfo;
const constants = require('../../../../constants');
const createKeyForUserBucket = require('./createKeyForUserBucket');
const metadata = require('../../../metadata/wrapper');
Expand Down
5 changes: 3 additions & 2 deletions lib/api/apiUtils/bucket/bucketWebsite.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ const { parseString } = require('xml2js');
const { errors, s3middleware } = require('arsenal');

const escapeForXml = s3middleware.escapeForXml;
const { WebsiteConfiguration }
= require('../../../metadata/WebsiteConfiguration');
const { WebsiteConfiguration } =
require('arsenal').models.WebsiteConfiguration;

/*
Format of xml request:
Expand Down
3 changes: 2 additions & 1 deletion lib/api/apiUtils/bucket/getReplicationConfiguration.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const parseXML = require('../../../utilities/parseXML');
const ReplicationConfiguration = require('./models/ReplicationConfiguration');
const ReplicationConfiguration =
require('arsenal').models.ReplicationConfiguration;

// Handle the steps for returning a valid replication configuration object.
function getReplicationConfiguration(xml, log, cb) {
Expand Down
Loading

0 comments on commit a2a773e

Please sign in to comment.