Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
installsystems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Seblu
installsystems
Commits
ff7d903d
Commit
ff7d903d
authored
13 years ago
by
Seblu
Browse files
Options
Downloads
Patches
Plain Diff
Command copy use new image syntax
parent
400a8138
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/is
+12
-17
12 additions, 17 deletions
bin/is
with
12 additions
and
17 deletions
bin/is
+
12
−
17
View file @
ff7d903d
...
...
@@ -116,20 +116,17 @@ def c_copy(parser, args):
'''
Copy an image from a repository to another one
'''
# load repositories
repoman
=
load_repositories
(
args
)
srcrepo
=
repoman
[
args
.
repo_src
]
dstrepo
=
repoman
[
args
.
repo_dst
]
# load source image
srcimg
=
srcrepo
.
get
(
args
.
image
,
args
.
image_version
)
# Advertise
arrow
(
"
Copying %s v%s from %s to %s
"
%
(
srcimg
.
name
,
srcimg
.
version
,
srcrepo
.
config
.
name
,
dstrepo
.
config
.
name
))
arrowlevel
(
1
)
dstrepo
.
add
(
srcimg
)
arrowlevel
(
-
1
)
dstrepo
=
repoman
[
args
.
repository
]
for
image
in
args
.
image
:
srcimg
,
srcrepo
=
select_image
(
image
,
repoman
)
arrow
(
"
Copying %s v%s from repository %s to %s
"
%
(
srcimg
.
name
,
srcimg
.
version
,
srcrepo
.
config
.
name
,
dstrepo
.
config
.
name
))
arrowlevel
(
1
)
dstrepo
.
add
(
srcimg
)
arrowlevel
(
-
1
)
def
c_del
(
parser
,
args
):
'''
...
...
@@ -349,10 +346,8 @@ p_clean.set_defaults(func=c_clean)
# copy command parser
p_copy
=
subparsers
.
add_parser
(
"
copy
"
,
help
=
c_copy
.
__doc__
.
lower
())
p_copy
.
add_argument
(
"
repo_src
"
,
help
=
"
name of source repository
"
)
p_copy
.
add_argument
(
"
repo_dst
"
,
help
=
"
name of destination repository
"
)
p_copy
.
add_argument
(
"
image
"
,
help
=
"
image name
"
)
p_copy
.
add_argument
(
"
image_version
"
,
nargs
=
"
?
"
,
help
=
"
image version
"
)
p_copy
.
add_argument
(
"
repository
"
,
help
=
"
name of destination repository
"
)
p_copy
.
add_argument
(
"
image
"
,
nargs
=
"
+
"
,
help
=
"
image to copy
"
)
p_copy
.
set_defaults
(
func
=
c_copy
)
# del command parser
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment