Ejemplo n.º 1
0
 def get_erasure_code_profile_id(self, *args, **kwargs):
     """
     Get Erasure code profile Id by Name
     [Args]
         (dict) conn: Connection dictionary obtained after logging in
         (str) Name: Name of the Erasure code profile
     [Returns]
         (int) Id: Id of the matchining Certificate, or
             None: if no match found, or
         (dict) Error response: If Exception occured
     """
     banner("PCC.Get Erasure Code Profile Id")
     self._load_kwargs(kwargs)
     conn = BuiltIn().get_variable_value("${PCC_CONN}")
     return easy.get_erasure_code_profile_id_by_name(conn, Name=self.Name)
Ejemplo n.º 2
0
    def delete_erasure_code_profile(self, *args, **kwargs):
        """
        Delete Erasure Code Profile from PCC
        [Args]
            (dict) conn: Connection dictionary obtained after logging in
            (str) Name: Name of the Erasure code profile
        [Returns]
            (int) Profile Id: Profile Id of the erasure code
            (dict) Error response: If Exception occured
        """
        banner("PCC.Delete Erasure Code Profile")
        self._load_kwargs(kwargs)
        conn = BuiltIn().get_variable_value("${PCC_CONN}")

        profile_id = easy.get_erasure_code_profile_id_by_name(conn,
                                                              Name=self.Name)
        return pcc.delete_erasure_code_profile_by_id(conn, Id=str(profile_id))