IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17526


Ignore:
Timestamp:
May 5, 2008, 10:26:46 AM (18 years ago)
Author:
jhoblitt
Message:

remove use of parse_neb_key() from dsget
dsget doc updates

Location:
trunk/DataStore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataStore/Changes

    r17455 r17526  
    22
    330.07
     4    - remove use of parse_neb_key() from dsget
     5    - dsget doc updates
    46    - fix error reporting bug is dsfilesetls
    57    - change dsget to overwrite existing Nebulous keys
  • trunk/DataStore/scripts/dsget

    r17451 r17526  
    33# Copyright (C) 2006-2008  Joshua Hoblitt
    44#
    5 # $Id: dsget,v 1.16 2008-04-18 00:50:26 jhoblitt Exp $
     5# $Id: dsget,v 1.17 2008-05-05 20:26:46 jhoblitt Exp $
    66
    77use strict;
     
    1515use File::Temp ();
    1616use File::Basename qw( basename dirname );
    17 use Nebulous::Keys qw( parse_neb_key );
    1817
    1918use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
     
    3231    'md5|m=s'       => \$md5,
    3332    'filename|f=s'  => \$filename,
    34     'compress    => \$compress,
     33    'compress|c'    => \$compress,
    3534) or pod2usage( 2 );
    3635
     
    4140) unless defined $uri and defined $filename;
    4241
    43 # if --nebulous is specified, parse the nebulous name
    44 my ($uriVolume, $uriFilename);
    45 if ($nebulous) {
    46     ($uriVolume, $uriFilename) = parse_neb_key ($filename);
    47 }   
     42# XXX EAM : should not need parse_neb_key, but how to handle case
     43# where we supply --volume and neb://volume/path ?
     44# 1) parse anyway and check for conflict
     45# 2) drop --volume option
     46# JH: the Nebulous server contains the policy to handle this conflict.
     47# At present --volume will overide the volume in neb://volume/...
    4848
    4949# --volume implies --nebulous
     
    5151    $nebulous ||=1;
    5252}
    53 
    54 if ($volume and $uriVolume and ($volume ne $uriVolume)) {
    55     die "conflicting volume names specified";
    56 }
    57 
    58 if ($uriVolume) { $volume = $uriVolume; }
    59 if ($uriFilename) { $filename = $uriFilename; }
    60 
    61 # XXX EAM : should not need parse_neb_key, but how to handle case
    62 # where we supply --volume and neb://volume/path ?
    63 # 1) parse anyway and check for conflict
    64 # 2) drop --volume option
    6553
    6654if ($compress) {
     
    144132        unless defined $neb;
    145133
    146     # XXX see comment above and not blindly stomping
    147     # if the key doesn't already exist then create it
    148     # if it does, delete it so that we end up on the right storage volume
     134    # XXX see comment above about not blindly stomping the file
     135    # - if the key doesn't already exist then create it
     136    # - if it does, delete it so that we end up on the right storage volume
    149137    if ($neb->stat($filename)) {
    150138        $neb->delete($filename)
     
    180168=head1 SYNOPSIS
    181169
    182     dsget --uri <uri> --filename <filename> [--bytes <nbytes>] [--md5 <hex>] [--compress]
    183         [--nebulous] [--volume <volume name>]
     170    dsget --uri <uri> --filename <filename> [--bytes <nbytes>] [--md5 <hex>]
     171        [--compress] [--nebulous] [--volume <volume name>]
    184172
    185173=head1 DESCRIPTION
     
    213201Flag to enable C<nebulous> support.  When set C<--filename> is used as the
    214202Nebulous key.
     203
     204Optional.
     205
     206=item * --compress|-c
     207
     208When set C<dsget> will request a compressed version of the file.
    215209
    216210Optional.
Note: See TracChangeset for help on using the changeset viewer.