コード例 #1
0
ファイル: add_share.py プロジェクト: jrha/aquilon
    def render(self, session, logger, share,
               comments, hostname, resourcegroup, cluster, **arguments):

        validate_basic("share", share)
        holder = get_resource_holder(session,
                                     hostname, cluster, resourcegroup,
                                     compel=False)

        Share.get_unique(session, name=share, holder=holder, preclude=True)

        dbshare = Share(name=share, comments=comments)
        add_resource(session, logger, holder, dbshare)

        return
コード例 #2
0
    def render(self, session, logger, share, comments, hostname, resourcegroup,
               cluster, **arguments):

        validate_basic("share", share)
        holder = get_resource_holder(session,
                                     hostname,
                                     cluster,
                                     resourcegroup,
                                     compel=False)

        Share.get_unique(session, name=share, holder=holder, preclude=True)

        dbshare = Share(name=share, comments=comments)
        add_resource(session, logger, holder, dbshare)

        return
コード例 #3
0
ファイル: del_share.py プロジェクト: piojo/aquilon
 def render(self, session, logger, share, hostname, resourcegroup, cluster,
            **arguments):
     holder = get_resource_holder(session, hostname, cluster, resourcegroup)
     dbshare = Share.get_unique(session, name=share, holder=holder,
                                compel=True)
     del_resource(session, logger, dbshare)
     return
コード例 #4
0
    def render(self, session, logger, share, hostname, resourcegroup, cluster,
               **arguments):

        validate_basic("share", share)
        holder = get_resource_holder(session, hostname, cluster, resourcegroup)
        dbshare = Share.get_unique(session,
                                   name=share,
                                   holder=holder,
                                   compel=True)
        del_resource(session, logger, dbshare)
        return