-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring more with better CARP returns from SFTP mover.
- Loading branch information
Showing
3 changed files
with
59 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import os | ||
| import pathlib | ||
| import subprocess | ||
| import operator | ||
| import datetime | ||
| import json | ||
| import socket | ||
| import logging | ||
| import getpass | ||
| import shutil | ||
| import tarfile | ||
| import logging | ||
|
|
||
| from Bastion.Common import Thing, Unknown | ||
| import Bastion.Model | ||
| from Bastion.Curator import Manifest, BLONDE, Snap | ||
| from Bastion.CARP import Request, Receipt | ||
|
|
||
|
|
||
| class PackRequest(Request): | ||
| REPORT = PackReport | ||
| def __init__(self, asset, spooled, basis = None, **kwargs): | ||
| Request.__init__(self, kwargs.get("action", "pack")) | ||
|
|
||
| self.context['asset'] = str(asset.CURIE) | ||
| self.context['halo'] = str(asset.halo) | ||
|
|
||
| if basis: | ||
| self.context['detail'] = 'D' | ||
| self.context['basis'] = str(kwargs['basis']) | ||
| self.context['whence'] = kwargs['whence'].isoformat() | ||
| if 'genus' in kwargs: | ||
| self.context['genus'] = kwargs['genus'] | ||
| else: | ||
| self.context['detail'] = 'F' | ||
|
|
||
|
|
||
| class PackReport(Receipt): | ||
| def __init__(self, request, status, doc, obj = None, **kwargs): | ||
| Report.__init__(self, request, status, doc, obj, **kwargs) | ||
|
|
||
|
|
||
|
|
||
| class PutRequest(Request): | ||
| pass | ||
|
|
||
|
|
||
| class PutReceipt(Receipt): | ||
| pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters