예제 #1
0
        public override void ExecuteChildCmdlet()
        {
            PSChangeableAttribute attribute = new PSChangeableAttribute(DeleteEnabled, WriteEnabled, ListEnabled, ReadEnabled);

            if (this.ShouldProcess(string.Format("Update {0}:{1} under {2}", this.RepositoryName, this.Name, this.RegistryName)))
            {
                WriteObject(this.RegistryDataPlaneClient.UpdateTag(this.RepositoryName, this.Name, attribute));
            }
        }
        public override void ExecuteChildCmdlet()
        {
            PSChangeableAttribute attribute = new PSChangeableAttribute(DeleteEnabled, WriteEnabled, ListEnabled, ReadEnabled);

            if (ParameterSetName.Equals(ByManifestParameterSet))
            {
                if (this.ShouldProcess(string.Format("Update manitest {0}@{1} under {2}", this.RepositoryName, this.Manifest, this.RegistryName)))
                {
                    WriteObject(this.RegistryDataPlaneClient.UpdateManifest(this.RepositoryName, this.Manifest, attribute));
                }
            }
            else if (ParameterSetName.Equals(ByTagParameterSet))
            {
                if (this.ShouldProcess(string.Format("Update manitest for {0}:{1} under {2}", this.RepositoryName, this.Tag, this.RegistryName)))
                {
                    WriteObject(this.RegistryDataPlaneClient.UpdateManifestByTag(this.RepositoryName, this.Tag, attribute));
                }
            }
            else
            {
                throw new PSArgumentException("Invalid parameter set");
            }
        }
예제 #3
0
 public PSTagAttribute UpdateTag(string repository, string tag, PSChangeableAttribute attribute)
 {
     new ContainerRegistryTagUpdateOperation(this, repository, tag, attribute).ProcessRequest();
     return(GetTag(repository, tag));
 }
예제 #4
0
        public PSManifestAttribute UpdateManifestByTag(string repository, string tag, PSChangeableAttribute attribute)
        {
            PSTagAttribute tagAttribute = GetTag(repository, tag);

            return(UpdateManifest(repository, tagAttribute.Attributes.Digest, attribute));
        }
예제 #5
0
 public PSManifestAttribute UpdateManifest(string repository, string manifest, PSChangeableAttribute attribute)
 {
     new ContainerRegistryManifestUpdateOperation(this, repository, manifest, attribute).ProcessRequest();
     return(GetManifest(repository, manifest));
 }
예제 #6
0
 public PSRepositoryAttribute UpdateRepository(string repository, PSChangeableAttribute attribute)
 {
     new ContainerRegistryRepositoryUpdateOperation(this, repository, attribute).ProcessRequest();
     return(GetRepository(repository));
 }
 public ContainerRegistryManifestUpdateOperation(ContainerRegistryDataPlaneClient client, string repository, string manifest, PSChangeableAttribute attribute) : base(client)
 {
     this._repositoryName    = repository;
     this._manifestReference = manifest;
     this._attribute         = attribute;
 }
예제 #8
0
 public ContainerRegistryTagUpdateOperation(ContainerRegistryDataPlaneClient client, string repository, string tag, PSChangeableAttribute attribute) : base(client)
 {
     this._repositoryName = repository;
     this._tag            = tag;
     this._attribute      = attribute;
 }
 public ContainerRegistryRepositoryUpdateOperation(ContainerRegistryDataPlaneClient client, string name, PSChangeableAttribute attribute) : base(client)
 {
     this._repositoryName = name;
     this._attribute      = attribute;
 }